Skip to content

produceOptionNameByIndexCallback for GEMSelect and GEMSpinner - #141

Open
Spirik wants to merge 3 commits into
masterfrom
produceOptionNameByIndexCallback
Open

produceOptionNameByIndexCallback for GEMSelect and GEMSpinner#141
Spirik wants to merge 3 commits into
masterfrom
produceOptionNameByIndexCallback

Conversation

@Spirik

@Spirik Spirik commented Aug 24, 2026

Copy link
Copy Markdown
Owner
  • Support for produceOptionNameByIndexCallback() callback that is called before option name of GEMSelect or GEMSpinner is printed on the screen (allows to override option name being printed, e.g. to form it dynamically based on index of an option, or modify to add ellipsis character for overflowing values, etc.);
  • GEMSelect::setProduceOptionNameByIndexCallback(), GEMSpinner::setProduceOptionNameByIndexCallback() and GEMSelect::removeProduceOptionNameByIndexCallback(), GEMSpinner::removeProduceOptionNameByIndexCallback() methods;
  • ::getMenuItemValueLength() method made public (returns length available for menu item value to fit on screen);
  • ::getMenuItemTitleLength() method made public (returns length available for menu item title to fit on screen);
  • GEMSelect::getType(), GEMSelect::getLength(), GEMSelect::getSelectedOptionNum(), GEMSelect::getSelectedOptionName(), GEMSelect::getOptionNameByIndex() methods made public;
  • GEMSpinner::getType(), GEMSpinner::getLength(), GEMSpinner::getSelectedOptionNum() methods made public;
  • GEMSpinner::optionNameToCharBuffer() method to copy option name of the supplied GEMSpinnerValue object to provided char* buffer;
  • GEMSelect::setOptions() method to specify another set of available options (e.g. to support different option names for different languages);
  • New detectEncoder() function in supplied examples with rotary encoder that makes compiled sketch size a little smaller and loop() easier to read.

@Spirik Spirik added the WIP Work in progress - Do not merge! label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress - Do not merge!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant