Skip to content

Commit

Permalink
Add increment and decrement controls for numeric display options
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Abouzied <[email protected]>
  • Loading branch information
ahmedaabouzied committed Aug 16, 2021
1 parent ce27f83 commit e83c20a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DisplayOptionsPanel.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ in the source distribution for its full text.
#include "ProvideCurses.h"


static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
static const char* const DisplayOptionsFunctions[] = {"(De)Select ","Increment ", "Decrement ", "Done ", NULL};
static const char* const DisplayOptionsKeys[] = {"Enter","+", "-", "F10", "Esc"};
static const int DisplayOptionsEvents[] = {KEY_ENTER, '+', '-', KEY_F(10), 27};

static void DisplayOptionsPanel_delete(Object* object) {
Panel* super = (Panel*) object;
Expand Down Expand Up @@ -90,7 +92,7 @@ const PanelClass DisplayOptionsPanel_class = {
DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* scr) {
DisplayOptionsPanel* this = AllocThis(DisplayOptionsPanel);
Panel* super = (Panel*) this;
FunctionBar* fuBar = FunctionBar_new(DisplayOptionsFunctions, NULL, NULL);
FunctionBar* fuBar = FunctionBar_new(DisplayOptionsFunctions, DisplayOptionsKeys, DisplayOptionsEvents);
Panel_init(super, 1, 1, 1, 1, Class(OptionItem), true, fuBar);

this->settings = settings;
Expand Down

0 comments on commit e83c20a

Please sign in to comment.