Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 34.24 KB | None | 0 0
  1. // ImGui - standalone example application for GLFW + OpenGL2, using legacy fixed pipeline
  2. // If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
  3. // (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
  4.  
  5. // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
  6. // **Prefer using the code in the opengl3_example/ folder**
  7. // See imgui_impl_glfw.cpp for details.
  8.  
  9. // OrxIDE main002.cpp - morph test application from ImGui 1.63 WIP to 1.75 WIP
  10. // OrxIDE main006-006.cpp - store function pointer into token array
  11. // OrxIDE main0070.001.cpp - remove C++ function overloading
  12. // OrxIDE implement "Other" token for widget yet to "tokenize"
  13. // store function pointer for widget in token array
  14.  
  15. // https://github.com/ocornut/imgui/wiki
  16.  
  17. #include "imgui/imgui.h"
  18. #include <stdio.h>
  19. #include <cstdint>
  20.  
  21. #include <iostream>
  22. #include <fstream>
  23.  
  24. using namespace std;
  25.  
  26. extern "C"
  27.     {
  28. #include <orx.h>
  29.     }
  30.  
  31. #ifdef UNUSED
  32. #elif defined(__GNUC__)
  33. # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
  34. #elif defined(__LCLINT__)
  35. # define UNUSED(x) /*@unused@*/ x
  36. #elif defined(__cplusplus)
  37. # define UNUSED(x)
  38. #else
  39. # define UNUSED(x) x
  40. #endif
  41.  
  42. #define PHI 1.618033988749895
  43. #define BLANK_LINE ImGui::Text(" ");
  44. #define TAB "\t"
  45.  
  46. orxSTATUS orxFASTCALL orxImGui_Init();
  47. void orxFASTCALL orxImGui_Exit();
  48.  
  49. // log orxIDE Config calls
  50. //#define DEBUG_LOG_STREAM
  51.  
  52. // log using ImGui log function
  53. //#define DEBUG_LOG_IMGUI
  54.  
  55. // parse Config file every FRAMEPARSECOUNT
  56. #define FRAMEPARSECOUNT 30
  57. static size_t framecount = FRAMEPARSECOUNT;
  58.  
  59. void orxFASTCALL orxIDEotherWidget();
  60. bool orxFASTCALL orxIDEparseWidgetTrigger();
  61. void orxFASTCALL orxIDEparseWidgetToken();
  62.  
  63. orxVIEWPORT * gpstMainViewport = orxNULL;
  64. orxCAMERA * gpstMainCamera = orxNULL;
  65.  
  66. //////////////////////////////////////////////////////////////////////////
  67. // segregate all orxIDE static variables from boilerplate ImGui code
  68. namespace orxIDEconfig {
  69.  
  70.   const orxSTRING key = "widget";
  71.   const orxSTRING val = "ImGuiText";
  72.  
  73.   const orxSTRING File = "orxTest.ini";
  74.   const orxSTRING ConfigFileMissing = "Config file missing";
  75.   orxBOOL ConfigFileMissingFlag = false;
  76. }
  77.  
  78. namespace orxIDEstatus {
  79.  
  80.   bool defaults_load_need = true; // default settings load need
  81.  
  82.   bool show_Neo = true;      // show Neo test window
  83.   bool configcreate = false; // init config render orxIDE
  84.   bool editrender = false;   // render edited orxIDE config
  85.  
  86.   bool show_orxIDE = true;          // show orxIDE window
  87.   bool show_demo_window  = false;   // show ImGui demp
  88.   bool show_style_editor = false;   // show Style Editor
  89.   bool show_about_window = false;   // show show About Window
  90.   bool show_metrics_window = false; // show show Metrics Window
  91. }
  92.  
  93. #define ORXIDE_WIN_TITLE orxIDE::key_str[orxIDE::windowTitle]
  94. #define ORXIDE_TEXT orxIDE::key_str[orxIDE::text]
  95. #define ORXIDE_SEPARATOR orxIDE::key_str[orxIDE::separator]
  96. #define ORXIDE_CHECKBOX orxIDE::key_str[orxIDE::checkBox]
  97. #define ORXIDE_BUTTON orxIDE::key_str[orxIDE::button]
  98. #define ORXIDE_TEXTMULTI orxIDE::key_str[orxIDE::multiText]
  99.  
  100. #define ORXIDE_SECTION_ORXIDE orxIDE::section_str[orxIDE::section_orxIDE]
  101.  
  102. namespace orxIDE {
  103.  
  104.   orxU32 orxSTATUS; // save status
  105.  
  106.   char const spacer[] = " ";
  107.   char const * null = "";
  108.   char const * stringFormat = "%s";
  109.  
  110.   float WindowWidth = 530;
  111.   float WindowHeigth = 750;
  112.   float Xpos = 450;
  113.   float Ypos = 10;
  114.  
  115.   float WindowWidthNew  = 161 * PHI;
  116.   float WindowHeigthNew = 161;
  117.  
  118.   float XposNew = 50;
  119.   float YposNew = 10;
  120.  
  121.   ImGuiWindowFlags window_flags = 0;
  122.  
  123.   ImVec4 const green  = ImColor(0, 255,   0, 200);
  124.   ImVec4 const yellow = ImColor(0,   0, 255, 200);
  125.   ImVec4 const red    = ImColor(255, 0,   0, 200);
  126.  
  127. orxU32 Sectionwidgetcount;
  128. bool parse; // true - parse token request
  129.  
  130.   enum section_ {
  131.     section_resource,
  132.     section_orxIDE,
  133.     section_COUNT
  134.   };
  135.  
  136.   char const * section_str[section_COUNT] = {
  137.     "resource",
  138.     "orxIDE"
  139.   };
  140.  
  141. int orxIDEwidgetkey;  // stores key_
  142.  
  143.   enum key_ {
  144.     windowTitle, // ImGui::Begin(orxIDE::windowTitle, &orxIDEstatus::show_demo_window, orxIDE::window_flags);
  145.     text,        // Text(const char* fmt, ...)
  146.     separator,
  147.     checkBox,
  148.     button,
  149.     multiText,
  150.     key_COUNT
  151.   };
  152.  
  153.   char const * key_str[key_COUNT] = {
  154.     "windowTitle",
  155.     "text",
  156.     "separator",
  157.     "checkBox",
  158.     "button",
  159.     "multiText"
  160.   };
  161.  
  162.   size_t const key_len[key_COUNT] = {
  163.      strlen(ORXIDE_WIN_TITLE),
  164.      strlen(ORXIDE_TEXT),
  165.      strlen(ORXIDE_SEPARATOR),
  166.      strlen(ORXIDE_CHECKBOX),
  167.      strlen(ORXIDE_BUTTON),
  168.      strlen(ORXIDE_TEXTMULTI)
  169.   };
  170.  
  171.   // temporary variable used to display ImGui widget
  172.  
  173.   bool TMPcheckBoxFlag;        // ImGui::Checkbox
  174.  
  175. // ImGui::InputTextMultiline
  176.   char TMPtext[1024 * 16]="";
  177.   static ImGuiInputTextFlags TMPflags = ImGuiInputTextFlags_AllowTabInput;
  178.  
  179.   enum text_ {
  180.     Hello,
  181.     text_COUNT
  182.   };
  183.  
  184.   char const * text_str[text_COUNT] = {
  185.     "orxIDE - Hello orx team"
  186.   };
  187.  
  188.   orxU32 const str_output = UINT32_MAX;
  189.  
  190. #ifdef DEBUG_LOG_STREAM
  191.   ofstream errorMsgFile;
  192.   char const * errorMsgFileName = "errorMsgFile.txt";
  193. #endif
  194.  
  195. #ifdef DEBUG_LOG_IMGUI
  196.   const char* ImLogFile = "ImLogFile.txt";
  197. #endif
  198.  
  199. }
  200.  
  201. namespace orxIDEf { // function pointer set
  202.  
  203. bool checkBoxFlag[10];
  204. size_t checkBoxIndice;
  205. orxU32 orxIDEwidgetcount;
  206.  
  207. // argument type set
  208. struct argSet
  209. {
  210.     union {
  211.       struct {
  212.         const char* fmt; // 8 bytes
  213.         const char* str;
  214.       } text ;
  215.       struct {
  216.         const char* label; // 8 bytes
  217.         bool* v;
  218.       } checkbox;
  219.     };
  220. } arg[20]={};
  221.  
  222. // Widget variable set
  223. struct widgetVarSet
  224. {
  225.     union {
  226.       struct {
  227.       } ;
  228.       struct {
  229.         bool flag;
  230.       } checkBox;
  231.     };
  232. } warg[50]={};
  233.  
  234. // deprecated
  235. //void argStruInit(void) {
  236. //
  237. //  orxIDEf::arg[orxIDE::windowTitle].text.fmt = orxIDE::null;
  238. //  orxIDEf::arg[orxIDE::windowTitle].text.str = orxIDE::null;
  239. //
  240. //  orxIDEf::arg[orxIDE::text].text.fmt = orxIDE::stringFormat;
  241. //  orxIDEf::arg[orxIDE::text].text.str = orxIDE::null;
  242. //
  243. //  orxIDEf::arg[orxIDE::separator].text.fmt = orxIDE::null;
  244. //  orxIDEf::arg[orxIDE::separator].text.str = orxIDE::null;
  245. //
  246. //  orxIDEf::arg[orxIDE::checkBox].checkbox.label = orxIDE::null;
  247. //  orxIDEf::arg[orxIDE::checkBox].checkbox.v = nullptr; // placeholder
  248. //
  249. //  orxIDEf::arg[orxIDE::button].text.fmt = orxIDE::stringFormat;
  250. //  orxIDEf::arg[orxIDE::button].text.str = orxIDE::null;
  251. //
  252. //  orxIDEf::arg[orxIDE::multiText].text.fmt = orxIDE::stringFormat;
  253. //  orxIDEf::arg[orxIDE::multiText].text.str = orxIDE::null;
  254. //}
  255. // place holder function for windowTitle
  256. void windowTitlep(const void *, const void *) {
  257. }
  258. void windowTitle(void) {
  259. }
  260. // wrapper function ImGui::Text
  261. void Textp(const void * str, const void * fmt ) {
  262.   ImGui::Text((char *) fmt, (char *) str);
  263. }
  264. void Text(void) {
  265.   ImGui::Text((char *) orxIDE::stringFormat,
  266.                orxConfig_GetString(orxConfig_GetKey(orxIDEf::orxIDEwidgetcount)));
  267. }
  268. // wrapper function ImGui::Separator
  269. void Separatorp(const void *, const void *) {
  270.   ImGui::Separator();
  271. }
  272. void Separator(void) {
  273.   ImGui::Separator();
  274. }
  275. // wrapper function ImGui::Checkbox
  276. void Checkboxp(const void * label, const void *) {
  277.   ImGui::Checkbox((char *) label, &orxIDEf::checkBoxFlag[orxIDEf::checkBoxIndice]);
  278.   orxIDEf::checkBoxIndice++;
  279. }
  280. void Checkbox(void) {
  281.   ImGui::Checkbox(orxConfig_GetString(orxConfig_GetKey(orxIDEf::orxIDEwidgetcount)),
  282.                  &orxIDEf::checkBoxFlag[orxIDEf::checkBoxIndice]);
  283.  
  284.   orxIDEf::checkBoxIndice++;
  285. }
  286. void Other(){
  287.   orxIDEotherWidget();
  288. }
  289. // function pointer array type declarations
  290. typedef void (* const fpp_t) (const void *, const void *);
  291. typedef void (* const fp_t)  (void);
  292. // function pointer array declaration set
  293. fpp_t fpp[] =
  294.   // function pointer with parameter
  295.   {
  296.     windowTitlep,
  297.     Textp,
  298.     Separatorp,
  299.     Checkboxp
  300.   };
  301.   // function pointer without parameter
  302. fp_t fp[] =
  303.   {
  304.     windowTitle,
  305.     Text,
  306.     Separator,
  307.     Checkbox,
  308.     Other, // token to implement - button
  309.     Other  // token to implement - multiText
  310.   };
  311.  
  312. // token
  313. #define TOKENMAX 50
  314. fp_t * pfp[TOKENMAX]; // pointer to function pointer without param
  315.  
  316. //struct {
  317. //      fp_t * pfp; // pointer to function pointer without param
  318. //} onepfp;
  319.  
  320. //struct token
  321. //{
  322. //
  323. //    struct {
  324. //      fp_t * pfp; // pointer to function pointer without param
  325. //    };
  326. //
  327. //  union {
  328. //    struct {
  329. //      fpp_t * pfpp; // pointer to function pointer with param
  330. //    };
  331. //  };
  332. // } token[50]={}; // index orxIDEf::orxIDEwidgetcount
  333.  
  334. }
  335.  
  336. // append error messages to file
  337. #ifdef DEBUG_LOG_STREAM
  338.  
  339. void _debugFileStreamBlank() {
  340.  
  341.   orxIDE::errorMsgFile.open(orxIDE::errorMsgFileName);
  342. }
  343. void _debugFileStreamAppend() {
  344.  
  345.   orxIDE::errorMsgFile.open(orxIDE::errorMsgFileName, std::ios::app);
  346. }
  347. void _debugFileStreamClose() {
  348.  
  349.   orxIDE::errorMsgFile.close();
  350. }
  351. #endif
  352. //////////////////////////////////////////////////////////////////////////
  353. void ImGuiOrx_ResizeViewport()
  354.     {
  355.     orxFLOAT scr_w, scr_h;
  356.     orxDisplay_GetScreenSize(&scr_w, &scr_h);
  357.  
  358.     orxFLOAT vwp_w, vwp_h;
  359.     orxViewport_GetSize(gpstMainViewport, &vwp_w, &vwp_h);
  360.  
  361.     orxAABOX frustum;
  362.     orxCamera_GetFrustum(gpstMainCamera, &frustum);
  363.  
  364.     orxVECTOR cam_pos;
  365.     orxCamera_GetPosition(gpstMainCamera, &cam_pos);
  366.     orxCamera_SetFrustum(gpstMainCamera, vwp_w, vwp_h, frustum.vTL.fZ, frustum.vBR.fZ);
  367.     orxCamera_SetPosition(gpstMainCamera, &cam_pos);
  368.  
  369.     orxDEBUG_PRINT(orxDEBUG_LEVEL_LOG, "Viewport Size : %f, %f", vwp_w, vwp_h);
  370.     }
  371.  
  372. //////////////////////////////////////////////////////////////////////////
  373. orxSTATUS orxFASTCALL ImGuiOrx_EventHandler(const orxEVENT *_pstEvent)
  374.     {
  375.     return orxSTATUS_SUCCESS;
  376.     }
  377.  
  378. //////////////////////////////////////////////////////////////////////////
  379. orxSTATUS orxFASTCALL ImGuiOrx_Init()
  380.     {
  381.     orxImGui_Init();
  382.        
  383.     // Setup Dear ImGui binding
  384.     IMGUI_CHECKVERSION();
  385.  
  386.     /* create the gui context */
  387.     ImGui::CreateContext();
  388.  
  389.     /* add events to manage */
  390.     orxEvent_AddHandler(orxEVENT_TYPE_RENDER, ImGuiOrx_EventHandler);
  391.     orxEvent_AddHandler(orxEVENT_TYPE_VIEWPORT, ImGuiOrx_EventHandler);
  392.     orxEvent_AddHandler(orxEVENT_TYPE_DISPLAY, ImGuiOrx_EventHandler);
  393.  
  394.     // Setup style
  395.     ImGui::StyleColorsDark();
  396.     //ImGui::StyleColorsClassic();
  397.  
  398.     // Load Fonts
  399.     // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
  400.     // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
  401.     // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
  402.     // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
  403.     // - Read 'misc/fonts/README.txt' for more instructions and details.
  404.     // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
  405.     //io.Fonts->AddFontDefault();
  406.     //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
  407.     //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
  408.     //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
  409.     //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
  410.     //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
  411.     //IM_ASSERT(font != NULL);
  412.  
  413.     // Creates main viewport
  414.     gpstMainViewport = orxViewport_CreateFromConfig("MainViewport");
  415.  
  416.     // Gets main camera
  417.     gpstMainCamera = orxViewport_GetCamera(gpstMainViewport);
  418.  
  419.     return orxSTATUS_SUCCESS;
  420.     }
  421.  
  422. // Helper to display a little (?) mark which shows a tooltip when hovered.
  423. static void ShowHelpMarker(const char* desc)
  424. {
  425.     ImGui::TextDisabled("(?)");
  426.     if (ImGui::IsItemHovered())
  427.     {
  428.         ImGui::BeginTooltip();
  429.         ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
  430.         ImGui::TextUnformatted(desc);
  431.         ImGui::PopTextWrapPos();
  432.         ImGui::EndTooltip();
  433.     }
  434. }
  435.  
  436. orxU32 orxFASTCALL orxIDELog2Screen(orxU32 func_result, char const * func_str = orxNULL ,char const * result_str = "")
  437.     {
  438.  
  439.       orxIDE::orxSTATUS = func_result;
  440.  
  441. #ifdef DEBUG_LOG_STREAM
  442.       _debugFileStreamAppend();
  443.  
  444.       orxIDE::errorMsgFile << func_str << endl;
  445.  
  446.        _debugFileStreamClose();
  447. #endif
  448.  
  449. #ifdef DEBUG_LOG_IMGUI
  450.       ImGui::LogText("%s", func_str);
  451. #endif
  452.  
  453.       if (func_result != orxIDE::str_output)
  454.             ImGui::Text("%4d", func_result );
  455.  
  456.       ImGui::NextColumn();
  457.  
  458.       if (func_str == orxNULL) {
  459.           ImGui::NextColumn();
  460.           ImGui::NextColumn();
  461.       }
  462.       else {
  463.         ImGui::Text("%s", func_str);
  464.         ImGui::SameLine();
  465.       }
  466.  
  467. //      ImGui::SetCursorPosX((ImGui::GetCursorPosX() +5));
  468.       ImGui::TextColored(orxIDE::green, "%s", result_str);
  469.       ImGui::NextColumn();
  470.  
  471.       return func_result;
  472.  
  473.     }
  474. // clear orx Config stack
  475. void orxIDEclear_stack() {
  476.  
  477.   orxIDELog2Screen((orxU32) orxConfig_Clear (nullptr)
  478.                           ,"orxConfig_Clear (nullptr)"
  479.                           ,"empty stack");
  480. }
  481. // Save or create orxIDE Config
  482. void orxIDEConfig_Save() {
  483.   orxIDELog2Screen((orxU32)  orxConfig_Save(orxIDEconfig::File, orxFALSE ,orxNULL)
  484.                            ,"orxConfig_Save(orxIDEconfig::File, orxFALSE ,orxNULL)"
  485.                            ,"Save Config file");
  486. }
  487. // create orxIDE Config section
  488. void orxIDECreate_orxIDEsection() {
  489.  
  490.   orxIDELog2Screen((orxU32)   orxConfig_PushSection(ORXIDE_SECTION_ORXIDE)
  491.                             ,"orxConfig_PushSection(ORXIDE_SECTION_ORXIDE)");
  492.  
  493.   orxIDELog2Screen(orxIDE::str_output, orxIDE::spacer, "create [orxIDE] section");
  494.  
  495.   // set windowTitle to "orxIDE"
  496.   orxIDELog2Screen((orxU32)   orxConfig_SetStringBlock(ORXIDE_WIN_TITLE, orxIDE::text_str[orxIDE::Hello])
  497.                             ,"orxConfig_SetStringBlock(ORXIDE_WIN_TITLE, ORXIDE_SECTION_ORXIDE)");
  498.  
  499.   orxIDEConfig_Save();
  500.  
  501. }
  502. // load orxIDE Config
  503. void orxIDEConfig_Load() {
  504.  
  505. // 2020-01-01 at this time loading a non-existent config file
  506. // results in a core dumped
  507.  
  508.   if (!orxIDELog2Screen((orxU32) orxConfig_Load(orxIDEconfig::File)
  509.                           ,"orxConfig_Load(orxIDEconfig::File)"
  510.                           ,"load config file")
  511.  
  512.       || orxIDEconfig::ConfigFileMissingFlag)
  513.     {
  514.  
  515.       if (!orxIDEconfig::ConfigFileMissingFlag) { // execute once
  516.  
  517.         cout << orxIDEconfig::File << orxIDE::spacer << orxIDEconfig::ConfigFileMissing << endl;
  518.  
  519. #ifdef DEBUG_LOG_STREAM
  520.  
  521.         _debugFileStreamAppend();
  522.  
  523.         orxIDE::errorMsgFile << orxIDEconfig::File << orxIDE::spacer << orxIDEconfig::ConfigFileMissing << endl;
  524.  
  525.         _debugFileStreamClose();
  526.  
  527. //    assert((orxIDEconfig::ConfigFileMissing ,false));
  528. #endif
  529.  
  530. #ifdef DEBUG_LOG_IMGUI
  531.         ImGui::LogText("%s %s", orxIDEconfig::ConfigFileMissing, orxIDEconfig::File);
  532. #endif
  533.         orxIDECreate_orxIDEsection(); // attempt to recover
  534.       }
  535.  
  536.       // execute each frame
  537.  
  538.       orxIDELog2Screen(orxIDE::str_output, orxIDE::spacer, "create missing Config file");
  539.       orxIDELog2Screen(orxIDE::str_output, orxIDE::spacer, orxIDEconfig::File);
  540.  
  541.       orxIDEconfig::ConfigFileMissingFlag = true; // keep information on screen log till orxIDETestrender() exit
  542.     }
  543. }
  544. // Select section [orxIDE]
  545. void orxFASTCALL orxIDESelectSection_orxIDE() {
  546.  
  547.     orxIDELog2Screen((orxU32) orxConfig_SelectSection(ORXIDE_SECTION_ORXIDE),
  548.                             "orxConfig_SelectSection(ORXIDE_SECTION_ORXIDE)",
  549.                             "select [orxIDE] section" );
  550. }
  551. // Get [orxIDE] windowTitle
  552. void orxIDEGetWindow_title() {
  553.  
  554.   orxIDELog2Screen(orxIDE::str_output
  555.                  ,"orxConfig_GetString(ORXIDE_WIN_TITLE)"
  556.           ,(char*) orxConfig_GetString(ORXIDE_WIN_TITLE));
  557.  
  558.   orxIDELog2Screen(orxIDE::str_output ,orxIDE::spacer
  559.                   ,"retrieve windowTitle in [orxIDE] section");
  560. }
  561.  
  562. void orxIDEinitRender() {
  563.  
  564.   orxIDELog2Screen(orxIDE::str_output, orxNULL, "*** Start render");
  565.  
  566.   orxIDEclear_stack();
  567.   orxIDEConfig_Load();
  568.   orxIDESelectSection_orxIDE();
  569. }
  570. // ensure string never null
  571. const char * SpaceIfEmpty(const char * str ){
  572.  
  573.   return((strlen(str)) ? str : orxIDE::spacer);
  574. }
  575. void orxFASTCALL orxIDEconfigParseEval(){
  576. // Eval loop
  577. // orxConfig_GetKeyCount()
  578. // orxSTRING orxConfig_GetKey ( orxU32 _u32KeyIndex )
  579.  
  580.     orxIDELog2Screen((orxU32)  orxConfig_GetSectionCount()
  581.                              ,"orxConfig_GetSectionCount()");
  582.  
  583.  
  584.     orxIDELog2Screen((orxU32)  orxIDE::Sectionwidgetcount
  585.                              ,"orxConfig_GetKeyCount()");
  586.  
  587.   // initiate window
  588.     ImGui::Begin(SpaceIfEmpty(orxConfig_GetString(ORXIDE_WIN_TITLE))
  589.                ,&orxIDEstatus::configcreate, orxIDE::window_flags);
  590.  
  591. //    static char text[1024 * 16] =
  592. //        "/*\n"
  593. //        " The Pentium F00F bug, shorthand for F0 0F C7 C8,\n"
  594. //        " the hexadecimal encoding of one offending instruction,\n"
  595. //        " more formally, the invalid operand with locked CMPXCHG8B\n"
  596. //        " instruction bug, is a design flaw in the majority of\n"
  597. //        " Intel Pentium, Pentium MMX, and Pentium OverDrive\n"
  598. //        " processors (all in the P5 microarchitecture).\n"
  599. //        "*/\n\n"
  600. //        "label:\n"
  601. //        "\tlock cmpxchg8b eax\n";
  602. //
  603. //    static ImGuiInputTextFlags flags = ImGuiInputTextFlags_AllowTabInput;
  604.  
  605.             // HelpMarker("You can use the ImGuiInputTextFlags_CallbackResize facility if you need to wire InputTextMultiline() to a dynamic string type. See misc/cpp/imgui_stdlib.h for an example. (This is not demonstrated in imgui_demo.cpp)");
  606. //            ImGui::CheckboxFlags("ImGuiInputTextFlags_ReadOnly", (unsigned int*)&flags, ImGuiInputTextFlags_ReadOnly);
  607. //            ImGui::CheckboxFlags("ImGuiInputTextFlags_AllowTabInput", (unsigned int*)&flags, ImGuiInputTextFlags_AllowTabInput);
  608. //            ImGui::CheckboxFlags("ImGuiInputTextFlags_CtrlEnterForNewLine", (unsigned int*)&flags, ImGuiInputTextFlags_CtrlEnterForNewLine);
  609. //            ImGui::InputTextMultiline("##source", text, IM_ARRAYSIZE(text), ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 16), flags);
  610.  
  611.     orxIDEparseWidgetTrigger();
  612.     { // render Config [orxIDE] section widget set
  613.  
  614.       orxIDEf::orxIDEwidgetcount = 0;
  615.       orxIDEf::checkBoxIndice = 0;
  616.  
  617.       while (orxIDEf::orxIDEwidgetcount < orxIDE::Sectionwidgetcount) {
  618.  
  619.         (*orxIDEf::pfp[orxIDEf::orxIDEwidgetcount])();
  620.  
  621.           orxIDEf::orxIDEwidgetcount++;
  622.       }
  623.     }
  624. }
  625. bool orxFASTCALL orxIDEparseWidgetTrigger() {
  626.  
  627.       if (framecount == 0 || orxIDE::parse ) {
  628.         // parse Config file every FRAMEPARSECOUNT
  629.         orxIDEparseWidgetToken();
  630.         framecount = FRAMEPARSECOUNT;
  631.         orxIDE::parse = false;
  632.         return true;
  633.       }
  634.       framecount--;
  635.  
  636.       return false;
  637. }
  638. // parse config widget
  639. // fill function pointer array - our preliminary "token"
  640. // render widget
  641. void orxFASTCALL orxIDEparseWidgetToken()
  642. { // render Config [orxIDE] section widget set
  643.  
  644.     orxIDEf::orxIDEwidgetcount = 0;
  645.     orxIDEf::checkBoxIndice = 0;
  646.  
  647.     orxIDE::Sectionwidgetcount = orxConfig_GetKeyCount();
  648.  
  649.      if (orxIDE::Sectionwidgetcount > TOKENMAX) {
  650.  
  651.         orxLOG("\norxIDEparseWidgetToken() - widget count %d surpass token array %d %s",
  652.                  orxIDEf::orxIDEwidgetcount,
  653.                  TOKENMAX);
  654.  
  655.         orxIDE::Sectionwidgetcount = TOKENMAX;
  656.      }
  657.  
  658.     while (orxIDEf::orxIDEwidgetcount < orxIDE::Sectionwidgetcount) {
  659.  
  660. //         orxLOG("\norxIDEconfigParseEval() - widget %d %d %s",
  661. //                 orxIDEf::orxIDEwidgetcount,
  662. //                 orxIDE::orxIDEwidgetkey,
  663. //                 orxIDE::key_str[orxIDE::orxIDEwidgetkey]);
  664.  
  665.       orxIDE::orxIDEwidgetkey = 0;
  666.       // find orxIDE::key_
  667.       while (orxIDE::orxIDEwidgetkey < orxIDE::key_COUNT) {
  668.  
  669.           if (!strncmp(orxConfig_GetKey(orxIDEf::orxIDEwidgetcount),
  670.                       (orxSTRING) orxIDE::key_str[orxIDE::orxIDEwidgetkey],
  671.                        orxIDE::key_len[orxIDE::orxIDEwidgetkey]))
  672.             {
  673.               break;
  674.             }
  675.           orxIDE::orxIDEwidgetkey++;
  676.         }
  677.  
  678.       assert (orxIDE::orxIDEwidgetkey < orxIDE::key_COUNT);
  679.  
  680.       orxIDEf::pfp[orxIDEf::orxIDEwidgetcount]
  681.           = &orxIDEf::fp[orxIDE::orxIDEwidgetkey];
  682.  
  683.       (*orxIDEf::pfp[orxIDEf::orxIDEwidgetcount])();
  684.  
  685.       orxIDEf::orxIDEwidgetcount++;
  686.  
  687.       }
  688. }
  689. // display non tokenized widget set
  690. void orxFASTCALL orxIDEotherWidget() {
  691.  
  692. //     orxLOG("\norxIDEotherWidget() - widget %d %s",
  693. //             orxIDE::orxIDEwidgetkey,
  694. //             orxIDE::key_str[orxIDE::orxIDEwidgetkey]);
  695.  
  696.       switch (orxIDE::orxIDEwidgetkey) {
  697.  
  698.         case orxIDE::button :
  699.  
  700.           ImGui::Button(orxConfig_GetString(orxConfig_GetKey(orxIDEf::orxIDEwidgetcount)));
  701.           break;
  702.  
  703.         case orxIDE::multiText :
  704.  
  705.           orxLOG("\norxIDEconfigParseEval() - orxIDE::multiText %d", orxIDE::orxIDEwidgetkey);
  706.  
  707.           strcpy(orxIDE::TMPtext, orxConfig_GetString(orxConfig_GetKey(orxIDEf::orxIDEwidgetcount)));
  708.  
  709.           ImGui::InputTextMultiline("##source",
  710.                                     orxIDE::TMPtext,
  711.                                     IM_ARRAYSIZE(orxIDE::TMPtext),
  712.                                     ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 16),
  713.                                     orxIDE::TMPflags);
  714.           break;
  715.  
  716.         default :
  717.          orxLOG("\norxIDEotherWidget() - widget type undefined %d %s",
  718.                  orxIDE::orxIDEwidgetkey,
  719.                  orxIDE::key_str[orxIDE::orxIDEwidgetkey]);
  720.       }
  721. }
  722. orxSTATUS orxFASTCALL orxIDEwindowRender() {
  723.  
  724.   orxIDEGetWindow_title();
  725.  
  726.   ImGui::SetNextWindowPos(ImVec2(orxIDE::XposNew, orxIDE::YposNew));
  727.   ImGui::SetNextWindowSize(ImVec2(orxIDE::WindowWidthNew, orxIDE::WindowHeigthNew), ImGuiCond_FirstUseEver);
  728.  
  729.   orxIDE::window_flags = 0;
  730.  
  731. //  orxIDE::window_flags |= ImGuiWindowFlags_NoCollapse;
  732. //        orxIDE::window_flags |= ImGuiWindowFlags_NoMove;
  733.  
  734.   // Begin render
  735.   orxIDEconfigParseEval();
  736.  
  737.   ImGui::End();
  738.  
  739.   return orxSTATUS_SUCCESS;
  740. }
  741. void orxIDEinitTestrender() {
  742.  
  743.   orxIDEclear_stack();
  744.  
  745.   orxIDELog2Screen((orxU32)   orxConfig_GetSectionCount()
  746.                             ,"orxConfig_GetSectionCount()"
  747.                             , "verify stack empty");
  748.  
  749.   orxIDECreate_orxIDEsection();
  750.  
  751.   orxIDELog2Screen(orxIDE::str_output, orxIDE::spacer ,"ORXIDE_WIN_TITLE - create windowTitle key");
  752.  
  753.   orxIDELog2Screen( orxIDE::str_output, "orxConfig_GetSection((orxU32) orxIDE::section_orxIDE)"
  754.                                       , (char*) orxConfig_GetSection(orxIDE::section_orxIDE));
  755.  
  756.   orxIDELog2Screen(orxIDE::str_output, orxIDE::spacer,"* Test - retrieve [orxIDE] section name by index ");
  757.  
  758. //        orxIDELog2Screen((orxU32)   orxConfig_SetStringBlock((char*) "window", orxIDE::section_str[orxIDE::section_orxIDE])
  759. //                          ,(char*) "orxConfig_SetStringBlock((char*) \"window\", orxIDE::section_str[orxIDE::section_orxIDE])");
  760. //
  761. //        orxIDELog2Screen((orxU32)   orxConfig_SetU32( "orxIDEconfig::key" , 0)
  762. //                          ,(char*) "orxConfig_SetU32(\"orxIDEconfig::key\", 0)");
  763.  
  764.   orxIDELog2Screen(orxIDE::str_output, orxNULL, "*** end *** create config file ");
  765.  
  766.   orxIDEclear_stack();
  767.   orxIDEConfig_Load();
  768.  
  769.   orxIDESelectSection_orxIDE();
  770.   orxIDEGetWindow_title();
  771.  
  772.   orxIDELog2Screen(orxIDE::str_output, orxNULL, "*** End Test");
  773. }
  774. /// orxIDE render GUI from config file
  775. orxSTATUS orxFASTCALL orxIDETestrender()
  776. {
  777.   orxIDEinitRender();
  778.   orxIDEwindowRender();
  779.  
  780.   orxIDELog2Screen(orxIDE::str_output, orxNULL,"*** End render");
  781.  
  782.   return orxSTATUS_SUCCESS;
  783. }
  784. /// orx config read/write test
  785. orxSTATUS orxFASTCALL orxIDE_Neo()
  786. {
  787.  
  788.     BLANK_LINE
  789.     ImGui::Separator();
  790.  
  791.     BLANK_LINE
  792.     ImGui::Checkbox("", &orxIDEstatus::configcreate);
  793.     ImGui::SameLine();
  794.     ImGui::TextColored(orxIDE::red, "overwrite / initialize orxIDE Config file!");
  795.     BLANK_LINE
  796.  
  797.     ImGui::Separator();
  798.  
  799.     if (orxIDEstatus::configcreate) {
  800.           // reset  orxIDETestrender() flag set
  801.           orxIDEstatus::editrender = false;
  802.           // forget Config if file was missing / recreated
  803.           orxIDEconfig::ConfigFileMissingFlag = false;
  804.       }
  805.  
  806.     BLANK_LINE
  807.     ImGui::TextColored(orxIDE::green, "Try this first!");
  808.     ImGui::Checkbox("orxIDE Config edit - render", &orxIDEstatus::editrender);
  809.     if (orxIDEstatus::editrender) {
  810.  
  811.         orxIDEstatus::configcreate = false;
  812.         orxIDE::parse = true; // request config widget parse
  813.     }
  814.  
  815.     if (orxIDEstatus::show_Neo) {
  816.  
  817.         BLANK_LINE
  818.  
  819.         // Child 1: no border, enable horizontal scrollbar
  820.         // ImGui::BeginChild("Child1", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.4f, 50), true, ImGuiWindowFlags_HorizontalScrollbar | (disable_mouse_wheel ? ImGuiWindowFlags_NoScrollWithMouse : 0));
  821.  
  822.         // table 2 col start
  823.         ImGui::BeginChild("ScrollProp##001",
  824.               ImVec2(ImGui::GetWindowContentRegionWidth() * 1.0f, 300),
  825.               true,
  826.               ImGuiWindowFlags_HorizontalScrollbar);
  827.               ImGui::Columns(2, "columns##001");
  828.               ImGui::SetColumnWidth(0, 50);
  829.  
  830.           if (orxIDEstatus::configcreate) orxIDEinitTestrender(); // automatically generate Config file
  831.           else if (orxIDEstatus::editrender) orxIDETestrender(); // use for manual Config file edit
  832.  
  833.           ImGui::EndChild();
  834.  
  835.           ImGui::LogButtons();
  836.  
  837.           ImGui::Separator();
  838.  
  839.           BLANK_LINE
  840.  
  841.           ImGui::Text( "KEY_LCTRL %d",
  842.               orxKeyboard_IsKeyPressed(orxKEYBOARD_KEY_LCTRL));
  843.  
  844.           ImGui::SameLine();
  845.  
  846.           ImGui::Text( "KEY_RCTRL %d",
  847.               orxKeyboard_IsKeyPressed(orxKEYBOARD_KEY_RCTRL));
  848.  
  849.           ImGui::SameLine();
  850.  
  851.           ImGui::Text( "LSHIFT %d",
  852.               orxKeyboard_IsKeyPressed(orxKEYBOARD_KEY_LSHIFT));
  853.     }
  854.  
  855.     return orxSTATUS_SUCCESS;
  856. }
  857.  
  858. /// ImGui multicolumn test
  859. orxSTATUS orxFASTCALL ImGui_Test_widget()
  860. {
  861.     ImGui::Spacing();
  862. //    ImGui::TextWrapped("This text should automatically wrap on the edge of the window. The current implementation for text wrapping follows simple rules suitable for English and possibly other languages.");
  863.  
  864. //    ImGui::Indent();
  865. //    ImGui::Unindent();
  866.  
  867. //    static float wrap_width = 400.0f;
  868. //
  869. //    BLANK_LINE
  870. //    ImVec2 pos = ImGui::GetCursorScreenPos();
  871. //    ImGui::GetWindowDrawList()->AddRectFilled(ImVec2(pos.x + wrap_width, pos.y), ImVec2(pos.x + wrap_width + 10, pos.y + ImGui::GetTextLineHeight()), IM_COL32(255,0,255,255));
  872. //    ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + wrap_width);
  873. //    ImGui::Text("%s", func_result);
  874. //    ImGui::GetWindowDrawList()->AddRect(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), IM_COL32(255,255,0,255));
  875. //    ImGui::PopTextWrapPos();
  876.  
  877.     BLANK_LINE
  878.     ImGui::Columns(1);
  879.     ImGui::Separator();
  880.  
  881.     ImGui::Text("Config property");
  882.     ImGui::Columns(3, "mycolumns"); // 4-ways, with border
  883.     ImGui::Separator();
  884.     ImGui::Text("ID"); ImGui::NextColumn();
  885.     ImGui::Text("Property"); ImGui::NextColumn();
  886.     ImGui::Text("Value"); ImGui::NextColumn();
  887.   //  ImGui::Text("Hovered"); ImGui::NextColumn();
  888.     ImGui::Separator();
  889.     char const * property[3] = { "One", "Two", "Three" };
  890.     char const * value[3] = { "/path/one", "/path/two", "/path/three" };
  891.     static int selected = -1;
  892.     for (int i = 0; i < 3; i++)
  893.     {
  894.         char label[32];
  895.         sprintf(label, "%04d", i);
  896.         if (ImGui::Selectable(label, selected == i, ImGuiSelectableFlags_SpanAllColumns))
  897.             selected = i;
  898.     //    bool hovered = ImGui::IsItemHovered();
  899.         ImGui::NextColumn();
  900.         ImGui::Text("%s", property[i]); ImGui::NextColumn();
  901.         ImGui::Text("%s", value[i]); ImGui::NextColumn();
  902.     }
  903.     ImGui::Columns(1);
  904.     ImGui::Separator();
  905. //  ImGui::TreePop();
  906.  
  907.     return orxSTATUS_SUCCESS;
  908.  
  909. }
  910.  
  911. ///
  912. orxSTATUS orxFASTCALL orxIDEConfig()
  913.     {
  914. #ifdef DEBUG_LOG_STREAM
  915.     _debugFileStreamBlank();
  916. #endif
  917.  
  918. #ifdef DEBUG_LOG_IMGUI
  919.     ImGui::LogToFile( -1, orxIDE::ImLogFile);
  920. #endif
  921.  
  922.     orxIDE_Neo();
  923.  
  924.     return orxSTATUS_SUCCESS;
  925.     }
  926.  
  927. void orxFASTCALL ImGuiOrx_Style_set()
  928.     {
  929.  
  930.     // You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it compares to an internally stored reference)
  931.     ImGuiStyle& style = ImGui::GetStyle();
  932.     static ImGuiStyle ref_saved_style;
  933.  
  934.     style.FrameRounding = 3.0f; // box ,, round
  935.     style.GrabRounding = 2.0f;
  936.  
  937.     }
  938.  
  939. //////////////////////////////////////////////////////////////////////////
  940. orxSTATUS orxFASTCALL ImGuiOrx_Run()
  941.     {
  942.     ImGui::Text("%s", (char*) ImGui::GetVersion());
  943.     ImGui::Text(" ");
  944.  
  945.     if (orxIDEstatus::defaults_load_need) {
  946.  
  947.       ImGuiOrx_Style_set(); // box ,, round
  948.       orxIDEstatus::defaults_load_need = false;
  949.     }
  950.  
  951.     orxFLOAT viewport_w, viewport_h;
  952.     orxViewport_GetSize(gpstMainViewport, &viewport_w, &viewport_h);
  953.  
  954.     // 1. Show a simple window
  955.     // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets appears in a window automatically called "Debug"
  956.  
  957.     ImGui::Text("Hello N!");
  958.  
  959.     BLANK_LINE
  960.  
  961.     ImGui::SetNextWindowSize(ImVec2(200, 200), ImGuiCond_FirstUseEver);
  962.  
  963.     ImGui::Checkbox("Help / demo" ,&orxIDEstatus::show_demo_window );
  964.     ImGui::Checkbox("N eo", &orxIDEstatus::show_Neo );
  965.     ImGui::Checkbox("Style Editor", &orxIDEstatus::show_style_editor);
  966.     ImGui::Checkbox("Show About Window", &orxIDEstatus::show_about_window);
  967.     ImGui::Checkbox("Show Metrics Window", &orxIDEstatus::show_metrics_window);
  968.  
  969.     BLANK_LINE
  970.     ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
  971.  
  972.     if (orxIDEstatus::show_about_window) ImGui::ShowAboutWindow();
  973.  
  974.     if (orxIDEstatus::show_metrics_window) ImGui::ShowMetricsWindow();
  975.  
  976.     // 2. Show another simple window, this time using an explicit Begin/End pair
  977.     if (orxIDEstatus::show_Neo )
  978.         {
  979.         ImGui::SetNextWindowPos(ImVec2(orxIDE::Xpos, orxIDE::Ypos));
  980.         ImGui::SetNextWindowSize(ImVec2(orxIDE::WindowWidth, orxIDE::WindowHeigth), ImGuiCond_FirstUseEver);
  981.  
  982.         orxIDE::window_flags |= ImGuiWindowFlags_NoCollapse;
  983. //        orxIDE::window_flags |= ImGuiWindowFlags_NoMove;
  984.         ImGui::Begin("N eo", &orxIDEstatus::show_demo_window, orxIDE::window_flags);
  985.  
  986. /*
  987.     if (no_titlebar)  orxIDE::window_flags |= ImGuiWindowFlags_NoTitleBar;
  988.     if (no_scrollbar) orxIDE::window_flags |= ImGuiWindowFlags_NoScrollbar;
  989.     if (!no_menu)     orxIDE::window_flags |= ImGuiWindowFlags_MenuBar;
  990.     if (no_move)      orxIDE::window_flags |= ImGuiWindowFlags_NoMove;
  991.     if (no_resize)    orxIDE::window_flags |= ImGuiWindowFlags_NoResize;
  992.     if (no_collapse)  orxIDE::window_flags |= ImGuiWindowFlags_NoCollapse;
  993.     if (no_nav)       orxIDE::window_flags |= ImGuiWindowFlags_NoNav;
  994.     if (no_close)     p_open = NULL; // Don't pass our bool* to Begin
  995. */
  996.         ImGui::Text("Neo version 006.004 pub");
  997.         BLANK_LINE
  998.  
  999.         static ImVec4 TxtColor = ImColor(114, 144, 154);
  1000.  
  1001.         ImGuiColorEditFlags ColorEditFlags = ImGuiColorEditFlags_PickerHueWheel
  1002.                                            + ImGuiColorEditFlags_AlphaBar
  1003.                                            + ImGuiColorEditFlags_NoInputs;
  1004.  
  1005. //            if (!alpha) flags |= ImGuiColorEditFlags_NoAlpha; // This is by default if you call ColorPicker3() instead of ColorPicker4()
  1006. //            if (alpha_bar) flags |= ImGuiColorEditFlags_AlphaBar;
  1007. //            if (!side_preview) flags |= ImGuiColorEditFlags_NoSidePreview;
  1008. //            if (picker_mode == 1) flags |= ImGuiColorEditFlags_PickerHueBar;
  1009. //            if (picker_mode == 2) flags |= ImGuiColorEditFlags_PickerHueWheel;
  1010. //            if (inputs_mode == 1) flags |= ImGuiColorEditFlags_NoInputs;
  1011. //            if (inputs_mode == 2) flags |= ImGuiColorEditFlags_RGB;
  1012. //            if (inputs_mode == 3) flags |= ImGuiColorEditFlags_HSV;
  1013. //            if (inputs_mode == 4) flags |= ImGuiColorEditFlags_HEX;
  1014. //            ImGui::ColorPicker4("MyColor##4", (float*)&color, flags, ref_color ? &ref_color_v.x : NULL);
  1015.  
  1016.         ImGui::ColorEdit3((char *) "", (float*)&TxtColor, ColorEditFlags);
  1017.         ImGui::SameLine();
  1018.         ShowHelpMarker("Change color\n - Click color for color wheel\n - Click color again to change");
  1019.         ImGui::SameLine();
  1020.         ImGui::TextColored(TxtColor, "Neo ,,start");
  1021.  
  1022.         orxIDEConfig();
  1023.  
  1024.         ImGui::End();
  1025.         }
  1026.  
  1027.     // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
  1028.     if (orxIDEstatus::show_demo_window )
  1029.         {
  1030.         ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
  1031.  
  1032.         ImGui::ShowDemoWindow();
  1033.         }
  1034.  
  1035.     if (orxIDEstatus::show_style_editor) {
  1036.  
  1037.       static int WindowSize2 = 300;
  1038.       ImGui::SetNextWindowPos(ImVec2(500, 400));
  1039.       ImGui::SetNextWindowSize(ImVec2(WindowSize2 * PHI, WindowSize2), ImGuiCond_FirstUseEver);
  1040.  
  1041.       static ImGuiWindowFlags window_flags2 = 0;
  1042.       ImGui::Begin("Style Editor", &orxIDEstatus::show_demo_window, window_flags2);
  1043.       ImGui::Text("Stylize");
  1044.  
  1045.       ImGui::ShowStyleEditor();
  1046.       ImGui::End();
  1047.     }
  1048.  
  1049.     ImGui::Render();
  1050.     return orxSTATUS_SUCCESS;
  1051.     }
  1052.  
  1053. //////////////////////////////////////////////////////////////////////////
  1054. void  orxFASTCALL ImGuiOrx_Exit()
  1055.     {
  1056.     orxImGui_Exit();
  1057.     }
  1058.  
  1059. //#ifndef __orxMSVC__
  1060. //////////////////////////////////////////////////////////////////////////
  1061. int main(int argc, char **argv)
  1062.     {
  1063.     /* Inits and executes orx */
  1064.  
  1065.     // initialize widget function pointer parameter set
  1066. //    orxIDEf::argStruInit();
  1067.  
  1068.     orx_Execute(argc, argv, ImGuiOrx_Init, ImGuiOrx_Run, ImGuiOrx_Exit);
  1069.     return EXIT_SUCCESS;
  1070.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement