Skip to content

Commit

Permalink
NES_NATIVE_WINDOWS: added menu separator in File menu
Browse files Browse the repository at this point in the history
Just to match the GTK UI
  • Loading branch information
Amjad50 committed Sep 8, 2020
1 parent 0dedaf0 commit 927edcb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nes_ui_native_windows/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use native_windows_gui as nwg;
use nwd::NwgUi;
use nwg::{
full_bind_event_handler, keys, ControlHandle, Event, EventData, ExternCanvas, FileDialog,
FileDialogAction, Menu, MenuItem, NativeUi, Timer, Window,
FileDialogAction, Menu, MenuItem, MenuSeparator, NativeUi, Timer, Window,
};
use winapi::um::{
wingdi::{
Expand Down Expand Up @@ -68,12 +68,18 @@ pub struct ProviderApp {
#[nwg_events(OnMenuItemSelected: [ProviderApp::menu_action_open(SELF)])]
file_menu_open_action: MenuItem,

#[nwg_control(parent: file_menu)]
_menu_separator_1: MenuSeparator,

#[nwg_control(parent: file_menu, text: "&Save state", disabled: false, popup: false)]
file_menu_save_state_menu: Menu,

#[nwg_control(parent: file_menu, text: "&Load state", disabled: false, popup: false)]
file_menu_load_state_menu: Menu,

#[nwg_control(parent: file_menu)]
_menu_separator_2: MenuSeparator,

#[nwg_control(parent: file_menu, text: "&Quit", disabled: false, check: false)]
#[nwg_events(OnMenuItemSelected: [ProviderApp::menu_action_quit(SELF)])]
file_menu_quit_action: MenuItem,
Expand Down Expand Up @@ -118,8 +124,10 @@ impl ProviderApp {
timer: Default::default(),
file_menu: Default::default(),
file_menu_open_action: Default::default(),
_menu_separator_1: Default::default(),
file_menu_save_state_menu: Default::default(),
file_menu_load_state_menu: Default::default(),
_menu_separator_2: Default::default(),
file_menu_quit_action: Default::default(),
game_menu: Default::default(),
game_menu_reset_action: Default::default(),
Expand Down

0 comments on commit 927edcb

Please sign in to comment.