Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Patch 1 #74

wants to merge 2 commits into from

Conversation

ykhlefh
Copy link

@ykhlefh ykhlefh commented Mar 31, 2018

No description provided.

Copy link
Owner

@jonblack jonblack left a 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 {
Copy link
Owner

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?

Copy link
Owner

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) {
Copy link
Owner

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;
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants