mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 22:52:27 -04:00
setting&autostart&widgets (OptionField and Waveform) imp (#2286)
* test * test * format * format * tune order
This commit is contained in:
parent
536d25db64
commit
d4edb5f5f9
5 changed files with 69 additions and 22 deletions
|
@ -680,7 +680,7 @@ class OptionsField : public Widget {
|
|||
std::function<void(size_t, value_t)> on_change{};
|
||||
std::function<void(void)> on_show_options{};
|
||||
|
||||
OptionsField(Point parent_pos, size_t length, options_t options);
|
||||
OptionsField(Point parent_pos, size_t length, options_t options, bool centered = false);
|
||||
|
||||
options_t& options() { return options_; }
|
||||
const options_t& options() const { return options_; }
|
||||
|
@ -708,6 +708,7 @@ class OptionsField : public Widget {
|
|||
const size_t length_;
|
||||
options_t options_;
|
||||
size_t selected_index_{0};
|
||||
bool centered_{false}; // e.g.: length as screen_width/8, x position as 0, it will be centered in x axis
|
||||
};
|
||||
|
||||
// A TextEdit is bound to a string reference and allows the string
|
||||
|
@ -1036,4 +1037,4 @@ class OptionTabView : public View {
|
|||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif /*__UI_WIDGET_H__*/
|
||||
#endif /*__UI_WIDGET_H__*/
|
Loading…
Add table
Add a link
Reference in a new issue