mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/shared] In go to parameter controller, center window at the same
time, the cursor is changed Change-Id: Ieece94131d0bf319078d36fcfe66c2bb58d0279d
This commit is contained in:
@@ -65,6 +65,8 @@ bool GoToParameterController::setParameterAtIndex(int parameterIndex, float f) {
|
||||
} else {
|
||||
m_cursor->moveTo(x, f);
|
||||
}
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::X, m_cursor->x());
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::Y, m_cursor->y());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ bool FunctionGoToParameterController::setParameterAtIndex(int parameterIndex, fl
|
||||
return false;
|
||||
}
|
||||
m_cursor->moveTo(f, y);
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::X, m_cursor->x());
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::Y, m_cursor->y());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ namespace Shared {
|
||||
GoToParameterController::GoToParameterController(Responder * parentResponder, InteractiveCurveViewRange * graphRange, CurveViewCursor * cursor, I18n::Message symbol) :
|
||||
FloatParameterController(parentResponder),
|
||||
m_cursor(cursor),
|
||||
m_abscisseCell(nullptr),
|
||||
m_graphRange(graphRange),
|
||||
m_abscisseCell(nullptr),
|
||||
m_abscissaSymbol(symbol)
|
||||
{
|
||||
}
|
||||
@@ -27,8 +27,6 @@ int GoToParameterController::reusableParameterCellCount(int type) {
|
||||
}
|
||||
|
||||
void GoToParameterController::buttonAction() {
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::X, m_cursor->x());
|
||||
m_graphRange->centerAxisAround(CurveViewRange::Axis::Y, m_cursor->y());
|
||||
StackViewController * stack = (StackViewController *)parentResponder();
|
||||
stack->pop();
|
||||
stack->pop();
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
protected:
|
||||
constexpr static float k_maxDisplayableFloat = 1E8f;
|
||||
CurveViewCursor * m_cursor;
|
||||
InteractiveCurveViewRange * m_graphRange;
|
||||
private:
|
||||
void buttonAction() override;
|
||||
HighlightCell * reusableParameterCell(int index, int type) override;
|
||||
@@ -23,7 +24,6 @@ private:
|
||||
void unloadView(View * view) override;
|
||||
char m_draftTextBuffer[MessageTableCellWithEditableText::k_bufferLength];
|
||||
MessageTableCellWithEditableText * m_abscisseCell;
|
||||
InteractiveCurveViewRange * m_graphRange;
|
||||
I18n::Message m_abscissaSymbol;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user