mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/*/go_to_parameter_controller] Use setParameterName
This commit is contained in:
@@ -27,6 +27,7 @@ const char * PreimageParameterController::title() {
|
||||
}
|
||||
|
||||
void PreimageParameterController::viewWillAppear() {
|
||||
setParameterName(I18n::Message::Y);
|
||||
m_preimageGraphController->setImage(m_cursor->y());
|
||||
Shared::GoToParameterController::viewWillAppear();
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ GoToParameterController::GoToParameterController(Responder * parentResponder, In
|
||||
|
||||
void GoToParameterController::setXPrediction(bool xPrediction) {
|
||||
m_xPrediction = xPrediction;
|
||||
setParameterName(xPrediction ? I18n::Message::X : I18n::Message::Y);
|
||||
}
|
||||
|
||||
const char * GoToParameterController::title() {
|
||||
@@ -78,17 +79,4 @@ bool GoToParameterController::setParameterAtIndex(int parameterIndex, double f)
|
||||
return true;
|
||||
}
|
||||
|
||||
void GoToParameterController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
if (index == numberOfRows()-1) {
|
||||
return;
|
||||
}
|
||||
MessageTableCellWithEditableText * myCell = (MessageTableCellWithEditableText *) cell;
|
||||
if (m_xPrediction) {
|
||||
myCell->setMessage(I18n::Message::X);
|
||||
} else {
|
||||
myCell->setMessage(I18n::Message::Y);
|
||||
}
|
||||
FloatParameterController::willDisplayCellForIndex(cell, index);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ public:
|
||||
GoToParameterController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, Store * store, Shared::CurveViewCursor * cursor, GraphController * graphController);
|
||||
void setXPrediction(bool xPrediction);
|
||||
const char * title() override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
private:
|
||||
double parameterAtIndex(int index) override;
|
||||
bool setParameterAtIndex(int parameterIndex, double f) override;
|
||||
|
||||
Reference in New Issue
Block a user