Skip to content

Instantly share code, notes, and snippets.

@dankar
Created December 11, 2018 19:22
Show Gist options
  • Save dankar/7ea16c5a797a5387ec6d564109a0f127 to your computer and use it in GitHub Desktop.
Save dankar/7ea16c5a797a5387ec6d564109a0f127 to your computer and use it in GitHub Desktop.
// Header
#pragma once
#include "menu.h"
DEFINE_MENU(gui_main_menu);
DEFINE_MENU(gui_settings_menu);
DEFINE_MENU(gui_debug_menu);
// cpp file
#include "menus.h"
#include "dialog.h"
#include "input_graph.h"
button_t main_menu_buttons[] = {
{"VSWR Graph", GET_DIALOG_REF(gui_main_menu)},
{"Debug", GET_DIALOG_REF(gui_debug_menu)},
{"Settings", GET_DIALOG_REF(gui_settings_menu)}
};
IMPLEMENT_MENU(gui_main_menu, main_menu_buttons);
button_t settings_menu_buttons[] = {
{"Back", GET_DIALOG_REF(gui_main_menu)}
};
IMPLEMENT_MENU(gui_settings_menu, settings_menu_buttons);
button_t debug_menu_buttons[] = {
{"Input graph", GET_DIALOG_REF(gui_input_graph)},
{"Back", GET_DIALOG_REF(gui_main_menu)}
};
IMPLEMENT_MENU(gui_debug_menu, debug_menu_buttons);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment