Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.20 KB | None | 0 0
  1. /* OriginMenu.cpp */
  2.  
  3. #include "stdafx.h"
  4.  
  5. int testint = 0;
  6. float testfloat = 0;
  7. bool testbool = false;
  8.  
  9. int testarray[] = { 1, 3, 5, 10 };
  10. int testarraypointer = 0;
  11.  
  12. bool firstload = true;
  13. LPCWSTR menuStyleLocation = L".\\OriginBase\\MenuStyle.ini";
  14. void OriginMenu() {
  15.     if (firstload) {
  16.         Menu::LoadMenuTheme(menuStyleLocation);
  17.  
  18.         firstload = false;
  19.     }
  20.  
  21.     Menu::checkKeys();
  22.  
  23.     // Has to look for mainmenu otherwise the code fails due to me setting menu to mainmenu on Keypress
  24.     if (Menu::currentMenu("mainmenu")) {
  25.         Menu::Title("Main Menu");
  26.  
  27.         Menu::Option("Test Option");
  28.  
  29.         Menu::MenuOption("Test Menu", "testmenu");
  30.  
  31.         Menu::IntOption("Test Int", &testint, 0, 10);
  32.         Menu::IntOption("Test Int Custom Step", &testint, 0, 10, 5);
  33.  
  34.         Menu::FloatOption("Test Float", &testfloat, 0, 10);
  35.         Menu::FloatOption("Test Float Custom Step", &testfloat, 0, 10, 0.2f);
  36.  
  37.         Menu::BoolOption("Test Bool", &testbool);
  38.  
  39.         Menu::IntArray("Test Int Array", testarray, &testarraypointer);
  40.  
  41.         Menu::MenuOption("Settings Menu", "settings");
  42.     }
  43.  
  44.     if (Menu::currentMenu("testmenu")) {
  45.         Menu::Title("Test Menu");
  46.  
  47.         Menu::Option("Filler Options");
  48.         Menu::Option("Filler Options");
  49.         Menu::Option("Filler Options");
  50.         Menu::Option("Filler Options");
  51.         Menu::Option("Filler Options");
  52.         Menu::Option("Filler Options");
  53.         Menu::Option("Filler Options");
  54.         Menu::Option("Filler Options");
  55.         Menu::Option("Filler Options");
  56.         Menu::Option("Filler Options");
  57.         Menu::Option("Filler Options");
  58.         Menu::Option("Filler Options");
  59.         Menu::Option("Filler Options");
  60.         Menu::Option("Filler Options");
  61.         Menu::Option("Filler Options");
  62.         Menu::Option("Filler Options");
  63.         Menu::Option("Filler Options");
  64.         Menu::Option("Filler Options");
  65.         Menu::Option("Filler Options");
  66.         Menu::Option("Filler Options");
  67.         Menu::Option("Filler Options");
  68.     }
  69.  
  70.     if (Menu::currentMenu("settings")) {
  71.         Menu::Title("Settings Menu");
  72.  
  73.         Menu::MenuOption("Theme", "settings_theme");
  74.     }
  75.     if (Menu::currentMenu("settings_theme")) {
  76.         Menu::Title("Theme");
  77.  
  78.         Menu::MenuOption("Title Text", "settings_theme_titletext");
  79.         Menu::MenuOption("Title Rect", "settings_theme_titlerect");
  80.         Menu::MenuOption("Scroller", "settings_theme_scroller");
  81.         Menu::MenuOption("Options Text", "settings_theme_options");
  82.         Menu::MenuOption("Options Rect", "settings_theme_optionsrect");
  83.         if (Menu::Option("Save Theme")) Menu::SaveMenuTheme(menuStyleLocation);
  84.         if (Menu::Option("Load Theme")) Menu::LoadMenuTheme(menuStyleLocation);
  85.         if (Menu::Option("Revert To Default")) {
  86.             titleText = { 0, 0, 0, 255 };
  87.             titleRect = { 255, 200, 0, 255 };
  88.             scroller = { 80, 80, 80, 200 };
  89.             options = { 0, 0, 0, 255 };
  90.             optionsrect = { 255, 220, 30, 60 };
  91.         }
  92.     }
  93.     if (Menu::currentMenu("settings_theme_titletext")) {
  94.         Menu::Title("Title Text");
  95.  
  96.         Menu::IntOption("Red: ", &titleText.r, 0, 255);
  97.         Menu::IntOption("Green: ", &titleText.g, 0, 255);
  98.         Menu::IntOption("Blue: ", &titleText.b, 0, 255);
  99.         Menu::IntOption("Alpha: ", &titleText.a, 0, 255);
  100.     }
  101.     if (Menu::currentMenu("settings_theme_titlerect")) {
  102.         Menu::Title("Title Rect");
  103.  
  104.         Menu::IntOption("Red: ", &titleRect.r, 0, 255);
  105.         Menu::IntOption("Green: ", &titleRect.g, 0, 255);
  106.         Menu::IntOption("Blue: ", &titleRect.b, 0, 255);
  107.         Menu::IntOption("Alpha: ", &titleRect.a, 0, 255);
  108.     }
  109.     if (Menu::currentMenu("settings_theme_scroller")) {
  110.         Menu::Title("Scroller");
  111.  
  112.         Menu::IntOption("Red: ", &scroller.r, 0, 255);
  113.         Menu::IntOption("Green: ", &scroller.g, 0, 255);
  114.         Menu::IntOption("Blue: ", &scroller.b, 0, 255);
  115.         Menu::IntOption("Alpha: ", &scroller.a, 0, 255);
  116.     }
  117.     if (Menu::currentMenu("settings_theme_options")) {
  118.         Menu::Title("Options Text");
  119.  
  120.         Menu::IntOption("Red: ", &options.r, 0, 255);
  121.         Menu::IntOption("Green: ", &options.g, 0, 255);
  122.         Menu::IntOption("Blue: ", &options.b, 0, 255);
  123.         Menu::IntOption("Alpha: ", &options.a, 0, 255);
  124.     }
  125.     if (Menu::currentMenu("settings_theme_optionsrect")) {
  126.         Menu::Title("Options Rect");
  127.  
  128.         Menu::IntOption("Red: ", &optionsrect.r, 0, 255);
  129.         Menu::IntOption("Green: ", &optionsrect.g, 0, 255);
  130.         Menu::IntOption("Blue: ", &optionsrect.b, 0, 255);
  131.         Menu::IntOption("Alpha: ", &optionsrect.a, 0, 255);
  132.     }
  133.  
  134.     Menu::endMenu();
  135.  
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement