-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch 1 #74
base: master
Are you sure you want to change the base?
Patch 1 #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add an example using the TextMenuItem
?
@@ -217,6 +217,46 @@ class MenuItem : public MenuComponent { | |||
virtual Menu* select(); | |||
}; | |||
|
|||
class TextMenuItem : public MenuItem { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What benefit does a TextMenuItem
have over using multiple MenuItem
's and cycling between them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not a fan of the name since a MenuItem
is really a menu item with some text. This is more like a combo box or select box. So if it is useful, I'd prefer a different name.
// ********************************************************* | ||
|
||
TextMenuItem::TextMenuItem(const char* name, SelectFnPtr select_fn) | ||
: MenuItem(name, select_fn),current_value_id(0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One initialization list item per line. See other classes for example.
String _value; | ||
int current_value_id; | ||
char** _values; | ||
int count; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All private member variable should be prefixed with an underscore.
No description provided.