From acf5622e0bbd352443b8550ee46717c628c648ec Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Sun, 5 Nov 2023 17:22:35 -0800 Subject: [PATCH] [BREAKING CHANGE] Fixes for opcodes --- src/opcodemgr.cpp | 22 +- tools/out.json | 2249 +++++++++++++++++++++++++++++++++++++++++++++ tools/tes.py | 6 +- 3 files changed, 2260 insertions(+), 17 deletions(-) create mode 100644 tools/out.json diff --git a/src/opcodemgr.cpp b/src/opcodemgr.cpp index 8e4674f..fa84512 100644 --- a/src/opcodemgr.cpp +++ b/src/opcodemgr.cpp @@ -195,12 +195,7 @@ static RTN_TYPE RUNTIME_API ImGuiCheckbox(RUNTIME_CONTEXT ctx) { }; bool clicked = data->GetData(buf, 0, state); - if (clicked) { - wSetIntParam(ctx, data->GetData(buf, 1, state)); - } else { - wSetIntParam(ctx, state); - } - + wUpdateCompareFlag(ctx, clicked ? data->GetData(buf, 1, state) : state); return RTN_CONTINUE; } @@ -552,7 +547,7 @@ static RTN_TYPE RUNTIME_API ImGuiBeginMainMenuBar(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, state); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -577,7 +572,7 @@ static RTN_TYPE RUNTIME_API ImGuiMenuItem(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, state); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -592,7 +587,7 @@ static RTN_TYPE RUNTIME_API ImGuiSelectable(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, state); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -648,7 +643,7 @@ static RTN_TYPE RUNTIME_API ImGuiCollapsingHeader(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, state); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -926,7 +921,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemActive(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, ImGui::IsItemActive()); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -939,7 +934,6 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemHovered(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, ImGui::IsItemHovered()); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); wUpdateCompareFlag(ctx, data->GetData(buf, 0, 0)); return RTN_CONTINUE; } @@ -953,7 +947,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemClicked(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, ImGui::IsItemClicked()); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } @@ -966,7 +960,7 @@ static RTN_TYPE RUNTIME_API ImGuiIsItemFocused(RUNTIME_CONTEXT ctx) { data->SetData(buf, 0, ImGui::IsItemFocused()); }; - wSetIntParam(ctx, data->GetData(buf, 0, false)); + wUpdateCompareFlag(ctx, data->GetData(buf, 0, false)); return RTN_CONTINUE; } diff --git a/tools/out.json b/tools/out.json new file mode 100644 index 0000000..32ae999 --- /dev/null +++ b/tools/out.json @@ -0,0 +1,2249 @@ +[ + { + "id": "2203", + "name": "IMGUI_END", + "num_params": 0, + "class": "ImGui", + "member": "End", + "attrs": { + "is_static": true + }, + "short_desc": "Ends the window", + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "isChecked", + "type": "bool" + } + ], + "output": [ + { + "name": "isChecked", + "type": "bool", + "source": "var_any" + } + ], + "id": "2215", + "name": "IMGUI_CHECKBOX", + "num_params": 3, + "short_desc": "Creates the checkbox", + "class": "ImGui", + "member": "Checkbox", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "buttonName", + "type": "string" + }, + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + } + ], + "id": "2218", + "name": "IMGUI_BUTTON", + "num_params": 3, + "short_desc": "Creates the button", + "class": "ImGui", + "member": "Button", + "attrs": { + "is_static": true, + "is_condition": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "buttonName", + "type": "string" + }, + { + "name": "red", + "type": "float" + }, + { + "name": "green", + "type": "float" + }, + { + "name": "blue", + "type": "float" + }, + { + "name": "alpha", + "type": "float" + }, + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + } + ], + "id": "221B", + "name": "IMGUI_COLOR_BUTTON", + "num_params": 7, + "short_desc": "Creates the button with custom colors", + "class": "ImGui", + "member": "ButtonColored", + "attrs": { + "is_static": true, + "is_condition": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "buttonName", + "type": "string" + }, + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + } + ], + "id": "221A", + "name": "IMGUI_INVISIBLE_BUTTON", + "num_params": 3, + "short_desc": "Creates the invisible button", + "class": "ImGui", + "member": "ButtonInvisible", + "attrs": { + "is_static": true, + "is_condition": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "x", + "type": "float" + }, + { + "name": "y", + "type": "float" + }, + { + "name": "imGuiCond", + "type": "ImGuiCond" + } + ], + "id": "220A", + "name": "IMGUI_SET_WINDOW_POS", + "num_params": 3, + "short_desc": "Sets the current window position. Must be called inside Begin()...End()", + "class": "ImGui", + "member": "SetWindowPos", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + }, + { + "name": "imGuiCond", + "type": "ImGuiCond" + } + ], + "id": "220B", + "name": "IMGUI_SET_WINDOW_SIZE", + "num_params": 3, + "short_desc": "Sets the current window size. Must be called inside Begin()...End()", + "class": "ImGui", + "member": "SetWindowSize", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "x", + "type": "float" + }, + { + "name": "y", + "type": "float" + }, + { + "name": "imGuiCond", + "type": "ImGuiCond" + } + ], + "id": "220C", + "name": "IMGUI_SET_NEXT_WINDOW_POS", + "num_params": 3, + "short_desc": "Sets the current window position. Applies to the next window ( aka Begin() )", + "class": "ImGui", + "member": "SetNextWindowPos", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + }, + { + "name": "imGuiCond", + "type": "ImGuiCond" + } + ], + "id": "220D", + "name": "IMGUI_SET_NEXT_WINDOW_SIZE", + "num_params": 3, + "short_desc": "Sets the current window size. Applies to the next window ( aka Begin() )", + "class": "ImGui", + "member": "SetNextWindowSize", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + } + ], + "id": "2226", + "name": "IMGUI_DUMMY", + "num_params": 2, + "short_desc": "Creates the dummy widget. Used for spacing", + "class": "ImGui", + "member": "Dummy", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "220E", + "name": "IMGUI_TEXT", + "num_params": 1, + "short_desc": "Creates the text line", + "class": "ImGui", + "member": "Text", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "2210", + "name": "IMGUI_TEXT_DISABLED", + "num_params": 1, + "short_desc": "Creates the text line with the disabled color ( Grayish by default )", + "class": "ImGui", + "member": "TextDisabled", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "2211", + "name": "IMGUI_TEXT_WRAPPED", + "num_params": 1, + "short_desc": "Creates the text line that wraps to a newline if the text goes beyond the window width", + "class": "ImGui", + "member": "TextWrapped", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + }, + { + "name": "red", + "type": "float" + }, + { + "name": "green", + "type": "float" + }, + { + "name": "blue", + "type": "float" + }, + { + "name": "alpha", + "type": "float" + } + ], + "id": "2212", + "name": "IMGUI_TEXT_COLORED", + "num_params": 5, + "short_desc": "Creates the text line of the given RGBA color (0.0f-1.0f)", + "class": "ImGui", + "member": "TextColored", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "2213", + "name": "IMGUI_BULLET_TEXT", + "num_params": 1, + "short_desc": "Creates the text line with a bullet point", + "class": "ImGui", + "member": "TextWithBullet", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "2217", + "name": "IMGUI_SET_TOOLTIP", + "num_params": 1, + "short_desc": "Creates the popup window with the given text", + "class": "ImGui", + "member": "SetTooltip", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "2227", + "name": "IMGUI_SAMELINE", + "num_params": 0, + "short_desc": "Appends the next widget to the same line as the previous widget", + "class": "ImGui", + "member": "SameLine", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "2228", + "name": "IMGUI_NEWLINE", + "num_params": 0, + "short_desc": "Creates a new line for the next widget", + "class": "ImGui", + "member": "NewLine", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "222B", + "name": "IMGUI_SPACING", + "num_params": 0, + "short_desc": "Adds some spacing after the previous widget", + "class": "ImGui", + "member": "Spacing", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "222C", + "name": "IMGUI_SEPARATOR", + "num_params": 0, + "short_desc": "Adds a horizontal separator line", + "class": "ImGui", + "member": "Separator", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "222A", + "name": "IMGUI_NEXT_COLUMN", + "num_params": 0, + "short_desc": "Puts the next widgets on the next column. Used alongside 0C16", + "class": "ImGui", + "member": "NextColumn", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "count", + "type": "int" + } + ], + "id": "2229", + "name": "IMGUI_COLUMNS", + "num_params": 1, + "short_desc": "Divides the window width into N columns. Close this with Columns(1)", + "class": "ImGui", + "member": "Columns", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "output": [ + { + "name": "fps", + "type": "int", + "source": "var_any" + } + ], + "id": "2244", + "name": "GET_FRAMERATE", + "num_params": 1, + "short_desc": "Returns game FPS", + "class": "Game", + "member": "GetFramerate", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "output": [ + { + "name": "version", + "type": "string", + "source": "var_any" + } + ], + "id": "2245", + "name": "IMGUI_GET_VERSION", + "num_params": 1, + "short_desc": "Returns the ImGui version", + "class": "ImGui", + "member": "GetVersion", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "output": [ + { + "name": "version", + "type": "float", + "source": "var_any" + } + ], + "id": "2246", + "name": "IMGUI_GET_PLUGIN_VERSION", + "num_params": 1, + "short_desc": "Returns the ImGuiRedux version", + "class": "ImGui", + "member": "GetPluginVersion", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "show", + "type": "bool" + } + ], + "id": "2247", + "name": "IMGUI_SET_CURSOR_VISIBLE", + "num_params": 1, + "short_desc": "Toggles the cursor", + "class": "ImGui", + "member": "SetCursorVisible", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "output": [ + { + "name": "width", + "type": "float", + "source": "var_any" + }, + { + "name": "height", + "type": "float", + "source": "var_any" + } + ], + "id": "224E", + "name": "IMGUI_GET_DISPLAY_SIZE", + "num_params": 2, + "class": "ImGui", + "attrs": { + "is_static": true + }, + "member": "GetDisplaySize", + "short_desc": "Returns the width & height of the display" + }, + { + "output": [ + { + "name": "height", + "type": "float", + "source": "var_any" + } + ], + "id": "2248", + "name": "IMGUI_GET_FRAME_HEIGHT", + "num_params": 1, + "short_desc": "Returns the ImGui frame height", + "class": "ImGui", + "member": "GetFrameHeight", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "x", + "type": "float", + "source": "var_any" + }, + { + "name": "y", + "type": "float", + "source": "var_any" + } + ], + "id": "2249", + "name": "IMGUI_GET_WINDOW_POS", + "num_params": 3, + "short_desc": "Returns the x,y coordinates of the window on the screen", + "class": "ImGui", + "member": "GetWindowPos", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "width", + "type": "float", + "source": "var_any" + }, + { + "name": "height", + "type": "float", + "source": "var_any" + } + ], + "id": "224A", + "name": "IMGUI_GET_WINDOW_SIZE", + "num_params": 3, + "short_desc": "Returns the width and height of the window", + "class": "ImGui", + "member": "GetWindowSize", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "output": [ + { + "name": "width", + "type": "float", + "source": "var_any" + }, + { + "name": "height", + "type": "float", + "source": "var_any" + } + ], + "id": "224B", + "name": "IMGUI_CALC_TEXT_SIZE", + "num_params": 3, + "short_desc": "Returns the width and height of the given text", + "class": "ImGui", + "member": "CalcTextSize", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "width", + "type": "float", + "source": "var_any" + } + ], + "id": "224C", + "name": "IMGUI_GET_WINDOW_CONTENT_REGION_WIDTH", + "num_params": 2, + "short_desc": "Returns the content region width of the window", + "class": "ImGui", + "member": "GetWindowContentRegionWidth", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "active", + "type": "bool", + "source": "var_any" + } + ], + "id": "2204", + "name": "IMGUI_BEGIN_MAINMENUBAR", + "num_params": 2, + "short_desc": "Creates the main menu bar", + "class": "ImGui", + "member": "BeginMainMenuBar", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "2205", + "name": "IMGUI_END_MAINMENUBAR", + "num_params": 0, + "short_desc": "Ends the main menu bar", + "class": "ImGui", + "member": "EndMainMenuBar", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + }, + { + "name": "selected", + "type": "bool" + }, + { + "name": "enabled", + "type": "bool" + } + ], + "output": [ + { + "name": "clicked", + "type": "bool", + "source": "var_any" + } + ], + "id": "2224", + "name": "IMGUI_MENU_ITEM", + "num_params": 4, + "short_desc": "Adds the menu item", + "class": "ImGui", + "member": "MenuItem", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + }, + { + "name": "selected", + "type": "bool" + } + ], + "output": [ + { + "name": "clicked", + "type": "bool", + "source": "var_any" + } + ], + "id": "2225", + "name": "IMGUI_SELECTABLE", + "num_params": 3, + "short_desc": "Adds the selectable widget", + "class": "ImGui", + "member": "Selectable", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "id": "2206", + "name": "IMGUI_BEGIN_CHILD", + "num_params": 1, + "short_desc": "Creates a child window widget inside the main window", + "class": "ImGui", + "member": "BeginChild", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "2207", + "name": "IMGUI_END_CHILD", + "num_params": 0, + "short_desc": "Ends the child window widget created with 0C25", + "class": "ImGui", + "member": "EndChild", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "width", + "type": "float" + } + ], + "id": "222D", + "name": "IMGUI_PUSH_ITEM_WIDTH", + "num_params": 1, + "short_desc": "Sets the item width for the next widgets", + "class": "ImGui", + "member": "PushItemWidth", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "222E", + "name": "IMGUI_POP_ITEM_WIDTH", + "num_params": 0, + "short_desc": "Removes the pushed item width (0C27) from the stack", + "class": "ImGui", + "member": "PopItemWidth", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + } + ], + "output": [ + { + "name": "open", + "type": "bool", + "source": "var_any" + } + ], + "id": "2209", + "name": "IMGUI_COLLAPSING_HEADER", + "num_params": 2, + "short_desc": "Adds the collapsing header", + "class": "ImGui", + "member": "CollapsingHeader", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "initValue", + "type": "int" + }, + { + "name": "min", + "type": "int" + }, + { + "name": "max", + "type": "int" + } + ], + "output": [ + { + "name": "val", + "type": "int", + "source": "var_any" + } + ], + "id": "221D", + "name": "IMGUI_SLIDER_INT", + "num_params": 5, + "short_desc": "Creates the int slider input", + "class": "ImGui", + "member": "SliderInt", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "initValue", + "type": "float" + }, + { + "name": "min", + "type": "float" + }, + { + "name": "max", + "type": "float" + } + ], + "output": [ + { + "name": "val", + "type": "float", + "source": "var_any" + } + ], + "id": "221E", + "name": "IMGUI_SLIDER_FLOAT", + "num_params": 5, + "short_desc": "Creates the float slider input", + "class": "ImGui", + "member": "SliderFloat", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "initValue", + "type": "float" + }, + { + "name": "min", + "type": "float" + }, + { + "name": "max", + "type": "float" + } + ], + "output": [ + { + "name": "val", + "type": "float", + "source": "var_any" + } + ], + "id": "2220", + "name": "IMGUI_INPUT_FLOAT", + "num_params": 5, + "short_desc": "Creates the float input", + "class": "ImGui", + "member": "InputFloat", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "initValue", + "type": "int" + }, + { + "name": "min", + "type": "int" + }, + { + "name": "max", + "type": "int" + } + ], + "output": [ + { + "name": "val", + "type": "int", + "source": "var_any" + } + ], + "id": "221F", + "name": "IMGUI_INPUT_INT", + "num_params": 5, + "short_desc": "Creates the int input", + "class": "ImGui", + "member": "InputInt", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + } + ], + "output": [ + { + "name": "text", + "type": "string", + "source": "var_any" + } + ], + "id": "2221", + "name": "IMGUI_INPUT_TEXT", + "num_params": 2, + "short_desc": "Creates the text input", + "class": "ImGui", + "member": "InputText", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + }, + { + "name": "selectedBtn", + "type": "int" + }, + { + "name": "btnNo", + "type": "int" + } + ], + "output": [ + { + "name": "val", + "type": "int", + "source": "var_any" + } + ], + "id": "2222", + "name": "IMGUI_RADIO_BUTTON", + "num_params": 4, + "short_desc": "Creates the radio button", + "class": "ImGui", + "member": "RadioButton", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "label", + "type": "string" + } + ], + "output": [ + { + "name": "red", + "type": "int", + "source": "var_any" + }, + { + "name": "green", + "type": "int", + "source": "var_any" + }, + { + "name": "blue", + "type": "int", + "source": "var_any" + }, + { + "name": "alpha", + "type": "int", + "source": "var_any" + } + ], + "id": "2223", + "name": "IMGUI_COLOR_PICKER", + "num_params": 5, + "short_desc": "Creates the color picker and sets the default color (0-255)", + "class": "ImGui", + "member": "ColorPicker", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "id": "2200", + "name": "IMGUI_BEGIN_FRAME", + "num_params": 1, + "short_desc": "Creates a unique frame with its own space in memory. End it with 0C32. MUST BE UNIQUE!", + "class": "ImGui", + "member": "BeginFrame", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "id": "2201", + "name": "IMGUI_END_FRAME", + "num_params": 0, + "short_desc": "Ends unique ImGui frame", + "class": "ImGui", + "member": "EndFrame", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "state", + "type": "bool", + "source": "var_any" + } + ], + "id": "222F", + "name": "IMGUI_IS_ITEM_ACTIVE", + "num_params": 2, + "short_desc": "Returns true if the previous widget is in active state", + "class": "ImGui", + "member": "IsItemActive", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "state", + "type": "bool", + "source": "var_any" + } + ], + "id": "2230", + "name": "IMGUI_IS_ITEM_CLICKED", + "num_params": 2, + "short_desc": "Returns true if the previous widget is clicked", + "class": "ImGui", + "member": "IsItemClicked", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "state", + "type": "bool", + "source": "var_any" + } + ], + "id": "2231", + "name": "IMGUI_IS_ITEM_FOCUSED", + "num_params": 2, + "short_desc": "Returns true if the previous widget is focused", + "class": "ImGui", + "member": "IsItemFocused", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + } + ], + "output": [ + { + "name": "state", + "type": "bool", + "source": "var_any" + } + ], + "id": "2232", + "name": "IMGUI_IS_ITEM_HOVERED", + "num_params": 2, + "short_desc": "Returns true if the previous widget is hovered with mouse", + "class": "ImGui", + "member": "IsItemHovered", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "uniqueId", + "type": "string" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "spacing", + "type": "bool" + } + ], + "output": [ + { + "name": "x", + "type": "float", + "source": "var_any" + }, + { + "name": "y", + "type": "float", + "source": "var_any" + } + ], + "id": "224D", + "name": "IMGUI_GET_SCALING_SIZE", + "num_params": 5, + "short_desc": "Returns the width and height scaling factor based on the window size", + "class": "ImGui", + "member": "GetScalingSize", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "alpha", + "type": "float" + } + ], + "id": "224F", + "name": "IMGUI_SET_NEXT_WINDOW_TRANSPARENCY", + "num_params": 1, + "class": "ImGui", + "member": "SetNextWindowTransparency", + "short_desc": "Sets the background transparency of next window (0.0f-1.0f)", + "attrs": { + "is_static": true + }, + "versions": [ + "1.0" + ], + "platforms": [ + "pc" + ] + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "2250", + "name": "IMGUI_SET_MESSAGE", + "num_params": 1, + "class": "ImGui", + "short_desc": "Displays a text message on top left corner of the screen. Useful for games without `showTextBox(...)` support", + "attrs": { + "is_static": true + }, + "member": "SetMessage" + }, + { + "input": [ + { + "name": "name", + "type": "string" + }, + { + "name": "imGuiDir", + "type": "ImGuiDir" + } + ], + "id": "221C", + "name": "IMGUI_ARROW_BUTTON", + "num_params": 2, + "class": "ImGui", + "attrs": { + "is_static": true, + "is_condition": true + }, + "short_desc": "Creates the arrow button in the specified direction", + "member": "ButtonArrow" + }, + { + "id": "2214", + "name": "IMGUI_BULLET", + "num_params": 0, + "class": "ImGui", + "short_desc": "Creates a bullet point", + "member": "Bullet", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "name", + "type": "string" + }, + { + "name": "options", + "type": "string" + }, + { + "name": "selection", + "type": "int" + } + ], + "output": [ + { + "name": "selected", + "type": "int", + "source": "var_any" + } + ], + "id": "2216", + "name": "IMGUI_COMBO", + "num_params": 4, + "class": "ImGui", + "member": "ComboBox", + "short_desc": "Creates a combo box widget. Pass options separated by commas \"item1,item2,item3\"", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "name", + "type": "string" + }, + { + "name": "image", + "type": "int" + }, + { + "name": "width", + "type": "float" + }, + { + "name": "height", + "type": "float" + } + ], + "id": "2219", + "name": "IMGUI_IMAGE_BUTTON", + "num_params": 4, + "class": "ImGui", + "member": "ButtonImage", + "short_desc": "Creates a ImGui button with specified image", + "attrs": { + "is_static": true, + "is_condition": true + } + }, + { + "input": [ + { + "name": "path", + "type": "string" + } + ], + "output": [ + { + "name": "image", + "type": "int", + "source": "var_any" + } + ], + "id": "2238", + "name": "IMGUI_LOAD_IMAGE", + "num_params": 2, + "class": "ImGui", + "member": "LoadImage", + "short_desc": "Loads a image file from disk. Relative to CLEO directory", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "image", + "type": "int" + } + ], + "id": "2239", + "name": "IMGUI_FREE_IMAGE", + "num_params": 1, + "class": "ImGui", + "member": "FreeImage", + "short_desc": "Frees a loaded image data", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "text", + "type": "string" + } + ], + "id": "220F", + "name": "IMGUI_TEXT_CENTERED", + "num_params": 1, + "class": "ImGui", + "member": "TextCentered", + "short_desc": "Displays a center aligned ImGui text widget", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "imGuiStyleVar", + "type": "ImGuiStyleVar" + }, + { + "name": "val", + "type": "float" + } + ], + "id": "223A", + "name": "IMGUI_PUSH_STYLE_VAR", + "num_params": 2, + "class": "ImGui", + "member": "PushStyleVar", + "short_desc": "Pushes a ImGuiStyleVar value to the stack. Use PopStyleVar to undo the effect", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "imGuiStyleVar", + "type": "ImGuiStyleVar" + }, + { + "name": "x", + "type": "float" + }, + { + "name": "y", + "type": "float" + } + ], + "id": "223B", + "name": "IMGUI_PUSH_STYLE_VAR2", + "num_params": 3, + "class": "ImGui", + "member": "PushStyleVar2", + "short_desc": "Pushes a ImGuiStyleVar value to the stack. Use PopStyleVar to undo the effect", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "imGuiCol", + "type": "ImGuiCol" + }, + { + "name": "r", + "type": "int" + }, + { + "name": "g", + "type": "int" + }, + { + "name": "b", + "type": "int" + }, + { + "name": "a", + "type": "int" + } + ], + "id": "223C", + "name": "IMGUI_PUSH_STYLE_COLOR", + "num_params": 5, + "class": "ImGui", + "member": "PushStyleColor", + "short_desc": "Pushes a ImGuiCol value to the stack. Use PopStyleColor to undo the effect", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "count", + "type": "int" + } + ], + "id": "223D", + "name": "IMGUI_POP_STYLE_VAR", + "num_params": 1, + "class": "ImGui", + "member": "PopStyleVar", + "short_desc": "Removes the recent imGuiStyleVar from the stack", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "count", + "type": "int" + } + ], + "id": "223E", + "name": "IMGUI_POP_STYLE_COLOR", + "num_params": 1, + "class": "ImGui", + "member": "PopStyleColor", + "short_desc": "Removes the recent ImGuiCol from the stack", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "name", + "type": "string" + }, + { + "name": "tabNames", + "type": "string" + } + ], + "output": [ + { + "name": "index", + "type": "int", + "source": "var_any" + } + ], + "id": "2208", + "name": "IMGUI_TABS", + "num_params": 3, + "class": "ImGui", + "member": "Tabs", + "short_desc": "Pass tab names separated by comma. Returns the index of the visible tab", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "r", + "type": "float" + }, + { + "name": "g", + "type": "float" + }, + { + "name": "b", + "type": "float" + }, + { + "name": "a", + "type": "float" + } + ], + "id": "2236", + "name": "IMGUI_SET_IMAGE_BG_COLOR", + "num_params": 4, + "class": "ImGui", + "member": "SetImageBgColor", + "short_desc": "Sets image background color", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "r", + "type": "float" + }, + { + "name": "g", + "type": "float" + }, + { + "name": "b", + "type": "float" + }, + { + "name": "a", + "type": "float" + } + ], + "id": "2237", + "name": "IMGUI_SET_IMAGE_TINT_COLOR", + "num_params": 4, + "class": "ImGui", + "member": "SetImageTintColor", + "short_desc": "Sets image tint color", + "attrs": { + "is_static": true + } + }, + { + "output": [ + { + "name": "drawList", + "type": "int", + "source": "var_any" + } + ], + "id": "223F", + "name": "IMGUI_GET_FOREGROUND_DRAWLIST", + "num_params": 1, + "class": "ImGui", + "member": "GetForegroundDrawList", + "short_desc": "Returns pointer to foreground draw list", + "attrs": { + "is_static": true + } + }, + { + "output": [ + { + "name": "drawList", + "type": "int", + "source": "var_any" + } + ], + "id": "2240", + "name": "IMGUI_GET_BACKGROUND_DRAWLIST", + "num_params": 1, + "class": "ImGui", + "member": "GetBackgroundDrawList", + "short_desc": "Returns pointer to ImGui background drawlist", + "attrs": { + "is_static": true + } + }, + { + "output": [ + { + "name": "drawList", + "type": "int", + "source": "var_any" + } + ], + "id": "2241", + "name": "IMGUI_GET_WINDOW_DRAWLIST", + "num_params": 1, + "class": "ImGui", + "member": "GetWindowDrawlist", + "short_desc": "Returns pointer to ImGui window drawList", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "drawList", + "type": "int" + }, + { + "name": "posX", + "type": "float" + }, + { + "name": "posY", + "type": "float" + }, + { + "name": "r", + "type": "int" + }, + { + "name": "g", + "type": "int" + }, + { + "name": "b", + "type": "int" + }, + { + "name": "a", + "type": "int" + }, + { + "name": "text", + "type": "string" + } + ], + "id": "2242", + "name": "IMGUI_DRAWLIST_ADD_TEXT", + "num_params": 8, + "class": "ImGui", + "member": "AddText", + "short_desc": "Adds text at specified position", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "drawList", + "type": "int" + }, + { + "name": "p1X", + "type": "float" + }, + { + "name": "p1Y", + "type": "float" + }, + { + "name": "p2X", + "type": "float" + }, + { + "name": "p2Y", + "type": "float" + }, + { + "name": "r", + "type": "int" + }, + { + "name": "g", + "type": "int" + }, + { + "name": "b", + "type": "int" + }, + { + "name": "a", + "type": "int" + }, + { + "name": "thickness", + "type": "float" + } + ], + "id": "2243", + "name": "IMGUI_DRAWLIST_ADD_LINE", + "num_params": 10, + "class": "ImGui", + "member": "AddLine", + "short_desc": "Adds a line form point A to B", + "attrs": { + "is_static": true + } + }, + { + "input": [ + { + "name": "id", + "type": "string" + }, + { + "name": "val", + "type": "int" + } + ], + "id": "2233", + "name": "IMGUI_SET_ITEM_INT", + "num_params": 2, + "class": "ImGui", + "member": "SetItemValueInt", + "short_desc": "Sets the value of input int & slider int widget", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "id", + "type": "string" + }, + { + "name": "val", + "type": "float" + } + ], + "id": "2234", + "name": "IMGUI_SET_ITEM_FLOAT", + "num_params": 2, + "short_desc": "Sets the value of input float & slider float widget", + "class": "ImGui", + "member": "SetItemValueFloat", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "id", + "type": "string" + }, + { + "name": "val", + "type": "string" + } + ], + "id": "2235", + "name": "IMGUI_SET_ITEM_TEXT", + "num_params": 2, + "short_desc": "Sets value of input text widget", + "class": "ImGui", + "member": "SetItemValueText", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + }, + { + "input": [ + { + "name": "windowName", + "type": "string" + }, + { + "name": "state", + "type": "bool" + }, + { + "name": "noTitleBar", + "type": "bool" + }, + { + "name": "noResize", + "type": "bool" + }, + { + "name": "noMove", + "type": "bool" + }, + { + "name": "autoResize", + "type": "bool" + } + ], + "output": [ + { + "name": "state", + "type": "bool", + "source": "var_any" + } + ], + "id": "2202", + "name": "IMGUI_BEGIN", + "num_params": 7, + "short_desc": "Creates the window", + "class": "ImGui", + "member": "Begin", + "attrs": { + "is_static": true + }, + "platforms": [ + "pc" + ], + "versions": [ + "1.0" + ] + } +] \ No newline at end of file diff --git a/tools/tes.py b/tools/tes.py index 2f7ea8c..7f1d7c4 100644 --- a/tools/tes.py +++ b/tools/tes.py @@ -85,13 +85,13 @@ } # Retrieve JSON data from the file -with open("C:/Users/Grinch_/Desktop/test.json", "r") as f: +with open("E:/ImGuiRedux/tools/test.json", "r") as f: data = json.load(f) outdata = [] - with open("C:/Users/Grinch_/Desktop/out.json", "w") as w: + with open("E:/ImGuiRedux/tools/out.json", "w") as w: for e in data["commands"]: - e["id"] = str(hex(lst[e["name"]])).replace("0x", ""); + e["id"] = str(hex(lst[e["name"]])).replace("0x", "").upper(); outdata.insert(-1, e); formatted_data = json.dumps(outdata, indent=2)