mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[escher][apps] CHange textField API
Change-Id: I766d153b7f7429473f297707a08358051123accc
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "parameters_controller.h"
|
||||
#include "../constant.h"
|
||||
#include "app.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -74,6 +75,10 @@ ParametersController::ParametersController(Responder * parentResponder, Law * la
|
||||
m_buttonSelected(false),
|
||||
m_calculationController(CalculationController(nullptr, law))
|
||||
{
|
||||
for (int k = 0; k < k_maxNumberOfCells; k++) {
|
||||
m_menuListCell[k].setParentResponder(&m_selectableTableView);
|
||||
m_menuListCell[k].setDelegate(this);
|
||||
}
|
||||
}
|
||||
|
||||
ExpressionTextFieldDelegate * ParametersController::textFieldDelegate() {
|
||||
@@ -150,7 +155,7 @@ int ParametersController::numberOfRows() {
|
||||
};
|
||||
|
||||
void ParametersController::willDisplayCellForIndex(TableViewCell * cell, int index) {
|
||||
TextMenuListCell * myCell = (TextMenuListCell *) cell;
|
||||
EditableTextMenuListCell * myCell = (EditableTextMenuListCell *) cell;
|
||||
myCell->setText(m_law->parameterNameAtIndex(index));
|
||||
FloatParameterController::willDisplayCellForIndex(cell, index);
|
||||
}
|
||||
@@ -173,5 +178,10 @@ void ParametersController::setParameterAtIndex(int parameterIndex, float f) {
|
||||
m_law->setParameterAtIndex(f, parameterIndex);
|
||||
}
|
||||
|
||||
bool ParametersController::textFieldDidReceiveEvent(TextField * textField, Ion::Events::Event event) {
|
||||
App * myApp = (App *)app();
|
||||
return myApp->textFieldDidReceiveEvent(textField, event);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user