[code] The addScript button disappears when needed.

When there is already the maximal number of scripts or when the
ScriptStore accordion buffer is full.

Change-Id: I0d43d42626da7f060a2309c66f1806b35a29bf38
This commit is contained in:
Léa Saviot
2017-11-10 17:49:05 +01:00
committed by Romain Goyet
parent 024067d8a8
commit 4f74b6d849
6 changed files with 37 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ public:
void renameScriptAtIndex(int i);
void deleteScriptAtIndex(int i);
void reloadConsole();
bool shouldDisplayAddScriptRow();
/* ViewController */
View * view() override { return &m_selectableTableView; }
@@ -55,7 +56,8 @@ public:
}
private:
static constexpr int k_maxNumberOfDisplayableScriptCells = 7; //TODO
static constexpr int k_maxNumberOfScripts = 8;
static constexpr int k_maxNumberOfDisplayableScriptCells = 5; // = 240/50
static constexpr int AddScriptCellType = 0;
static constexpr int ScriptCellType = 1;
static constexpr KDCoordinate k_rowHeight = 50; //TODO create common parent class with Shared::ListController