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

Add "ID" prop for selected menu item #62

Open
QuadVector opened this issue Mar 16, 2023 · 0 comments
Open

Add "ID" prop for selected menu item #62

QuadVector opened this issue Mar 16, 2023 · 0 comments

Comments

@QuadVector
Copy link

Hello! It will be a good idea if you will add "id" param for selected menu item. For example:

{
	name: "File",
	menu: [
		{
			name: "Close",
			id: "menu_close"
		}
	],
}

That feature can help to uniqualize menu items. Any menu actions will depend on its selected menu item id, not on its path or name. This will be very useful when developer will edit text of menu item or change language:

MenuSelect(e) {
	switch(e.id) {
		case "menu_close":
			app.quit();
			break;
	}
}
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

No branches or pull requests

1 participant