Closed AWSW-de closed 10 months ago
I use ControlType::Option extensively in my project. You can review the related ESPUI code at https://github.com/thomastech/PixelRadio See files named /src/webGUI.cpp and /src/callBacks.cpp
TL;DR: Since you want your menu choices to handle int values, your callback code would convert EPSUI's sender->value string vars to your required int vars. That's all there is to this.
Thanks a lot! I will have a look at this. Thanks for the hint as well. Kind regards
Hello, sorry i need to come back to this topic. Had a deep look into the linked files and they all use the tab option too...
Can you give me short example of an option list without the tab usage?
Thanks in advance :)
Kind regards
For those that come across this question and to close it off...
In ESPUIO.cpp, the basic control functions such as ESPUI.button() or ESPUI.slider()), ESPUI.text() are built on the more complex "addControl" with "Control::noParent" for the "parentalControl" (eg tab) variable.
You can therefore use "Control::noParent" for the "tab" variable in the constructor of the Select control type eg
ESPUI.addControl( ControlType::Select, "Title", "Default Option", ControlColor::Dark,Control::noParent,selectCallback);
Thanks for the hint. I will try that soon. =)
For those that come across this question and to close it off...
In ESPUIO.cpp, the basic control functions such as ESPUI.button() or ESPUI.slider()), ESPUI.text() are built on the more complex "addControl" with "Control::noParent" for the "parentalControl" (eg tab) variable.
You can therefore use "Control::noParent" for the "tab" variable in the constructor of the Select control type eg
ESPUI.addControl( ControlType::Select, "Title", "Default Option", ControlColor::Dark,Control::noParent,selectCallback);
Works fine, thanks a lot :)
Closed
First of all: A big thanks for this well done interface!
I am currently working on a new 3D printable WordClock project and started to use your interface, because it saves me tons of time. Before I wrote an html configuration page manually and after some time while adding more and more functions it was not good to manage…
This is more a question than a bug, but with the given examples I could not figure out how to use a “Options” drop-down list outside of a tab-menu. I want to add a drop down list to select the language of the WordClock layout and interface as well. The values are stored in a int variable as “0” for German and f.e. “1” for English language….
Can you please add an example how to add such an options menu to achieve this ?
Thanks in advance! =)