{"id":21299796,"url":"https://github.com/ericoporto/agsimgui","last_synced_at":"2025-04-14T17:21:47.059Z","repository":{"id":54385636,"uuid":"230785385","full_name":"ericoporto/agsimgui","owner":"ericoporto","description":"Dear ImGui plugin for Adventure Game Studio","archived":false,"fork":false,"pushed_at":"2021-02-21T23:45:53.000Z","size":2291,"stargazers_count":4,"open_issues_count":9,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T06:02:25.470Z","etag":null,"topics":["adventure-game-studio","adventuregamestudio","ags","dear-imgui"],"latest_commit_sha":null,"homepage":"https://www.adventuregamestudio.co.uk/forums/index.php?topic=57699.0","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericoporto.png","metadata":{"files":{"readme":"README.bbcode","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-29T18:01:43.000Z","updated_at":"2024-11-07T14:39:56.000Z","dependencies_parsed_at":"2022-08-13T14:10:11.010Z","dependency_job_id":null,"html_url":"https://github.com/ericoporto/agsimgui","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoporto%2Fagsimgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoporto%2Fagsimgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoporto%2Fagsimgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoporto%2Fagsimgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericoporto","download_url":"https://codeload.github.com/ericoporto/agsimgui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248923752,"owners_count":21183956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adventure-game-studio","adventuregamestudio","ags","dear-imgui"],"created_at":"2024-11-21T15:06:10.852Z","updated_at":"2025-04-14T17:21:47.037Z","avatar_url":"https://github.com/ericoporto.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[b][size=14pt]agsimgui[/size][/b]  [color=gray][b] version 0.3.0 [/b][/color]\n\n[img]https://dev.azure.com/ericoporto/agsimgui/_apis/build/status/ericoporto.agsimgui?branchName=master[/img]\n\n[url=https://github.com/ericoporto/agsimgui/releases/download/0.3.0/agsimgui.dll]Get Latest Release [b]agsimgui.dll[/b][/url] | [url=https://github.com/ericoporto/agsimgui/releases/download/0.3.0/libagsimgui.so][b]libagsimgui.so[/b][/url] | [url=https://github.com/ericoporto/agsimgui/releases/download/0.3.0/libagsimgui.dylib][b]libagsimgui.dylib[/b][/url] | [url=https://github.com/ericoporto/agsimgui]GitHub Repo[/url] | [b][url=https://github.com/ericoporto/agsimgui/releases/download/0.3.0/agsimgui_demo_windows.zip]Demo Windows[/url][/b] | [b][url=https://github.com/ericoporto/agsimgui/releases/download/0.3.0/agsimgui_demo_linux.tar.xz]Demo Linux[/url][/b]\n\nDear ImGui plugin for Adventure Game Studio\n\n[img]https://user-images.githubusercontent.com/2244442/71694439-f3ac1080-2d8d-11ea-9c98-e6954409b66b.gif[/img]\n\nSupports Directx9 and Software renderer. Using OpenGL will default to Software renderer for ImGui only (it has it's own renderer), but OpenGL support will be provided in the future.\n\nA more complete documentation [url=https://github.com/ericoporto/agsimgui/blob/master/README.md]is available here[/url].\n\n[b][size=12pt]Usage example[/size][/b]\n\nRun a simple demo window to see what's possible with Dear ImGui.\n[code=AGS]\n// use function room_RepExec() when in Room Script and link it throught the editor\nvoid repeatedly_execute(){\n  AgsImGui.NewFrame(); //let's begin a new frame, we end it with a Render\n  AgsImGui.ShowDemoWindow(); //Shows a demo of everything possible\n  AgsImGui.Render(); // This will generate drawing instructions. \n  // AGS will actually draw this on screen later on, on Post Screen Draw stage.\n}\n[/code]\nSome of what is shown on Demo Window is not yet exposed in the AgsImGui Script API.\n\nLet's do a simple example now.\n[code=AGS]\nbool is_button_clicked;\n\n// use function room_RepExec() when in Room Script and link it throught the editor\nvoid repeatedly_execute(){\n  AgsImGui.NewFrame(); //let's begin a new frame, we end it with a Render\n\nAgsImGui.BeginWindow(\"My first window\");    \n  ViewFrame* vf = Game.GetViewFrame(player.View, player.Loop, player.Frame);\n  is_button_clicked = AgsImGui.ImageButton(vf.Graphic); \n  if(AgsImGui.IsItemHovered()) AgsImGui.SetTooltip(String.Format(\"frame %d\",player.Frame));\n  player.x = AgsImGui.DragInt(\"player.x\", player.x);\n  player.y = AgsImGui.DragInt(\"player.y\", player.y);\n  AgsImGui.EndWindow();\n\nAgsImGui.Render(); // This will generate drawing instructions. \n  // AGS will actually draw this on screen later on, on Post Screen Draw stage.\n}\n[/code]\nNote ImGui will save a [tt]imgui.ini[/tt] file to allow window positions and some more data to persist between sections when no guidance is given.\n\n\n\n[b][size=12pt]AGS Script API[/size][/b]\n[spoiler]\n[i][b]Main[/b][/i]\n\n[*] [b][tt]AgsImGui.NewFrame[/tt][/b]\n\n[code]static void AgsImGui.NewFrame()[/code]\n\nCall this before calling any AgsImGui commands.\n\n\n[*] [b][tt]AgsImGui.EndFrame[/tt][/b]\n\n[code]static void AgsImGui.EndFrame()[/code]\n\nWe don't need this if we are using Render, since it will automatically call [tt]AgsImGui.EndFrame()[/tt] too.\n\n\n[*] [b][tt]AgsImGui.Render[/tt][/b]\n\n[code]static void AgsImGui.Render()[/code]\n\nThis will EndFrame and proceed to generate drawing instructions.\n\n\n[*] [b][tt]AgsImGui.GetStyle[/tt][/b]\n\n[code]static ImGuiStyle* AgsImGui.GetStyle()[/code]\n\nGets the Style customization use in AgsImGui. Check [tt]ImGuiStyle[/tt] for more information.\n\n\n[*] [b][tt]AgsImGui.SetStyle[/tt][/b]\n\n[code]static void AgsImGui.SetStyle(ImGuiStyle* imGuiStyle)[/code]\n\nSets the Style customization use in AgsImGui. Check [tt]ImGuiStyle[/tt] for more information.\n\n[code=AGS]\nImGuiStyle* style = AgsImGui.GetStyle();\nstyle.Alpha = 0.5\nstyle.Colors[eImGuiCol_PopupBg] = ImVec4.Create(1.00, 1.00, 1.00, 1.00); //white\nAgsImGui.SetStyle(style);\n[/code]\n\n\n\n[i][b]Demo, Debug, Information[/b][/i]\n\n[*] [b][tt]AgsImGui.GetVersion[/tt][/b]\n\n[code]static String AgsImGui.GetVersion()[/code]\n\n[*] [b][tt]AgsImGui.ShowDemoWindow[/tt][/b]\n\n[code]static void AgsImGui.ShowDemoWindow()[/code]\n\n[*] [b][tt]AgsImGui.ShowAboutWindow[/tt][/b]\n\n[code]static void AgsImGui.ShowAboutWindow()[/code]\n\n[*] [b][tt]AgsImGui.ShowMetricsWindow[/tt][/b]\n\n[code]static void AgsImGui.ShowMetricsWindow()[/code]\n\n[*] [b][tt]AgsImGui.ShowUserGuide[/tt][/b]\n\n[code]static void AgsImGui.ShowUserGuide()[/code]\n\n[hr]\n\n[i][b]Windows[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginWindow[/tt][/b]\n\n[code]static AgsImGui.ImGuiBeginWindow BeginWindow(String name, bool has_close_button = 0, ImGuiWindowFlags flags = 0)[/code]\n\n[*] [b][tt]AgsImGui.EndWindow[/tt][/b]\n\n[code]static void EndWindow()[/code]\n\n[hr]\n\n[i][b]Child Windows[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginChild[/tt][/b]\n\n[code]static bool BeginChild(String str_id, int width = 0, int height = 0, bool border = false, ImGuiWindowFlags flags = 0)[/code]\n\nChild Windows. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. Child windows can embed their own child.\n\n[*] [b][tt]AgsImGui.EndChild[/tt][/b]\n\n[code]static void EndChild()[/code]\n\nPop child window from the stack.\n\n[hr]\n\n[i][b]Item/Widgets Utilities[/b][/i]\n\nMost of the functions are referring to the last/previous item we submitted.\n\n[*] [b][tt]AgsImGui.IsItemHovered[/tt][/b]\n\n[code]static bool AgsImGui.IsItemHovered(ImGuiHoveredFlags flags = 0)[/code]\n\nIs the last item hovered? (and usable, aka not blocked by a popup, etc.). You can specify a flag for more options.\n\nstatic bool IsItemHovered(ImGuiHoveredFlags flags = 0)\n\n[*] [b][tt]AgsImGui.IsItemActive[/tt][/b]\n\n[code]static bool AgsImGui.IsItemActive()[/code]\n\nIs the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item.)\n\n[*] [b][tt]AgsImGui.IsItemFocused[/tt][/b]\n\n[code]static bool AgsImGui.IsItemFocused()[/code]\n\nIs the last item focused for keyboard navigation?\n\n[*] [b][tt]AgsImGui.IsItemVisible[/tt][/b]\n\n[code]static bool AgsImGui.IsItemVisible()[/code]\n\nIs the last item visible? (items may be out of sight because of clipping/scrolling)\n\n[*] [b][tt]AgsImGui.IsItemEdited[/tt][/b]\n\n[code]static bool AgsImGui.IsItemEdited()[/code]\n\nDid the last item modify its underlying value this frame? or was pressed? This is generally the same as the bool return value of many widgets.\n\n[*] [b][tt]AgsImGui.IsItemActivated[/tt][/b]\n\n[code]static bool AgsImGui.IsItemActivated()[/code]\n\nWas the last item just made active (item was previously inactive).\n\n[*] [b][tt]AgsImGui.IsItemDeactivated[/tt][/b]\n\n[code]static bool AgsImGui.IsItemDeactivated()[/code]\n\nWas the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing.\n\n[*] [b][tt]AgsImGui.IsItemDeactivatedAfterEdit[/tt][/b]\n\n[code]static bool AgsImGui.IsItemDeactivatedAfterEdit()[/code]\n\nWas the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that requires continuous editing.\n\n[*] [b][tt]AgsImGui.IsItemToggledOpen[/tt][/b]\n\n[code]static bool AgsImGui.IsItemToggledOpen()[/code]\n\nWas the last item open state toggled? set by TreeNode().\n\n[*] [b][tt]AgsImGui.IsAnyItemHovered[/tt][/b]\n\n[code]static bool AgsImGui.IsAnyItemHovered()[/code]\n\nis any item hovered?\n\n[*] [b][tt]AgsImGui.IsAnyItemActive[/tt][/b]\n\n[code]static bool AgsImGui.IsAnyItemActive()[/code]\n\nis any item active?\n\n[*] [b][tt]AgsImGui.IsAnyItemFocused[/tt][/b]\n\n[code]static bool AgsImGui.IsAnyItemFocused()[/code]\n\nis any item focused?\n\n[*] [b][tt]AgsImGui.IsWindowAppearing[/tt][/b]\n\n[code]static bool AgsImGui.IsWindowAppearing()[/code]\n\n'current window' = the window we are appending into while inside a Begin()/End() block.\n\n[*] [b][tt]AgsImGui.IsWindowCollapsed[/tt][/b]\n\n[code]static bool AgsImGui.IsWindowCollapsed()[/code]\n\nreturn true when window is collapsed. Use this between Begin and End of a window.\n\n[*] [b][tt]AgsImGui.IsWindowFocused[/tt][/b]\n\n[code]static bool AgsImGui.IsWindowFocused(ImGuiFocusedFlags flags=0)[/code]\n\nis current window focused? or its root/child, depending on flags. see flags for options. Use this between Begin and End of a window.\n\n[*] [b][tt]AgsImGui.IsWindowHovered[/tt][/b]\n\n[code]static bool AgsImGui.IsWindowHovered(ImGuiHoveredFlags flags=0)[/code]\n\nis current window hovered (and typically: not blocked by a popup/modal)? see flags for options. Use this between Begin and End of a window.\n\n[hr]\n\n[i][b]Widgets: Text[/b][/i]\n\n[*] [b][tt]AgsImGui.Text[/tt][/b]\n\n[code]static void AgsImGui.Text(String text)[/code]\n\nDraws a string of text.\n\n[*] [b][tt]AgsImGui.TextColored[/tt][/b]\n\n[code]static void AgsImGui.TextColored(int ags_color, String text)[/code]\n\nshortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();\n\n[*] [b][tt]AgsImGui.TextDisabled[/tt][/b]\n\n[code]static void AgsImGui.TextDisabled(String text)[/code]\n\nshortcut for PushStyleColor(ImGuiCol[cur]Text, style.Colors[ImGuiCol[/cur]TextDisabled]); Text(fmt, ...); PopStyleColor();\n\n[*] [b][tt]AgsImGui.TextWrapped[/tt][/b]\n\n[code]static void AgsImGui.TextWrapped(String text)[/code]\n\nshortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();.\n\n[*] [b][tt]AgsImGui.LabelText[/tt][/b]\n\n[code]static void AgsImGui.LabelText(String label, String text)[/code]\n\nDisplay text+label aligned the same way as value+label widgets .\n\n[*] [b][tt]AgsImGui.Bullet[/tt][/b]\n\n[code]static void AgsImGui.Bullet(String text)[/code]\n\nDraws a bullet and a string of text. Shortcut for Bullet()+Text().\n\n[hr]\n\n[i][b]Widgets: Main[/b][/i]\n\nMost widgets return true when the value has been changed or when pressed/selected.\n\nYou may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.\n\n[*] [b][tt]AgsImGui.Button[/tt][/b]\n\n[code]static bool AgsImGui.Button(String label, int width = 0, int height = 0)[/code]\n\nCreates a button. Returns true while button is pressed.\n\n[*] [b][tt]AgsImGui.SmallButton[/tt][/b]\n\n[code]static bool AgsImGui.SmallButton(String label)[/code]\n\nCreates a button with no padding to be easier to embed within text. Returns true while button is pressed.\n\n[*] [b][tt]AgsImGui.Image[/tt][/b]\n\n[code]static void AgsImGui.Image(int sprite_id)[/code]\n\nCreate an image with passed sprite ID.\n\n[*] [b][tt]AgsImGui.ImageButton[/tt][/b]\n\n[code]static bool AgsImGui.ImageButton(int sprite_id)[/code]\n\nCreate a button with an image with passed sprite ID. Returns true while button is pressed.\n\n[*] [b][tt]AgsImGui.ArrowButton[/tt][/b]\n\n[code]static bool AgsImGui.ArrowButton(String label, ImGuiDir dir)[/code]\n\nCreates a button with an arrow shape. Returns true while button is pressed.\n\n[*] [b][tt]AgsImGui.Checkbox[/tt][/b]\n\n[code]static bool AgsImGui.Checkbox(String label, bool initial_value)[/code]\n\nCreates a checkbox button. Returns true when button is marked.\n\n[*] [b][tt]AgsImGui.RadioButton[/tt][/b]\n\n[code]static bool AgsImGui.RadioButton(String label, bool active)[/code]\n\nCreates a radio button. Returns true while button is marked.\n\n[*] [b][tt]AgsImGui.Bullet[/tt][/b]\n\n[code]static void AgsImGui.Bullet()[/code]\n\nDraw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses .\n\n[hr]\n\n[i][b]Widgets: Selectables[/b][/i]\n\nA selectable highlights when hovered, and can display another color when selected.\n\n[*] [b][tt]AgsImGui.Selectable[/tt][/b]\n\n[code]static bool AgsImGui.Selectable(String label, bool selected = false, ImGuiSelectableFlags flags = 0, int width = 0, int height = 0)[/code]\n\nbool selected carry the selection state (read-only). When Selectable() is clicked it returns true so you can modify your selection state.\n\n[hr]\n\n[i][b]Widgets: Drag[/b][/i]\n\nCTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.\n\n[*] [b][tt]AgsImGui.DragFloat[/tt][/b]\n\n[code]static float AgsImGui.DragFloat(String label, float value, float min_value = 0, float max_value = 0, float speed = 0, String format = 0)[/code]\n\nReturns the current value of the drag box. Format string uses regular [code]\"%f\"[/code] specifiers, so you can use to define how many decimals you want.\n\n[*] [b][tt]AgsImGui.DragInt[/tt][/b]\n\n[code]static int AgsImGui.DragInt(String label, int value, int min_value = 0, int max_value = 0, float speed = 0, String format = 0)[/code]\n\nReturns the current value of the drag box. Format string uses regular [code]\"%d\"[/code], you can use it to specify left most zeroes.\n\n[hr]\n\n[i][b]Widgets: Slider[/b][/i]\n\nCTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.\n\n[*] [b][tt]AgsImGui.SliderFloat[/tt][/b]\n\n[code]static float AgsImGui.SliderFloat(String label, float value, float min_value = 0, float max_value = 0, String format = 0)[/code]\n\nReturns the current value of the slider. Format string uses regular [code]\"%f\"[/code] specifiers, so you can use to define how many decimals you want.\n\n[*] [b][tt]AgsImGui.SliderInt[/tt][/b]\n\n[code]static int AgsImGui.SliderInt(String label, int value, int min_value = 0, int max_value = 0, String format = 0)[/code]\n\nReturns the current value of the slider. Format string uses regular [code]\"%d\"[/code], you can use it to specify left most zeroes.\n\n[hr]\n\n[i][b]Widgets: Input with Keyboard[/b][/i]\n\n[*] [b][tt]AgsImGui.InputText[/tt][/b]\n\n[code]static String AgsImGui.InputText(String label, String text_buffer, int buffer_size, ImGuiInputTextFlags flags =0)[/code]\n\nPass a string to identify the input field as label, this label is going to be used for ID and can't be empty.\n\nRemember that we don't save state between frames, so you have to do this yourself by reapplying the output to input as needed.\n\nThis function returns [tt]null[/tt] when the input hasn't changed, and returns a string with all the text, when it has been modified.\n\nThis widget supports Ctrl+Z for undo, Ctrl+X for Cut, Ctrl+C for copy, Ctrl+V for pasting, mouse selection and cursor navigation with arrows.\nBehavior can be modified by passing flags, see the enums section. Flags can be combined with bitwise operations.\n\nExample:\n[code=AGS]\nString input_string;\nfunction room_RepExec() {\n  AgsImGui.NewFrame();\n    // buff\n  String out_string = AgsImGui.InputText(\"type here!\",input_string, 128);\n  if(out_string!=null) input_string = out_string;\n\n  AgsImGui.Render();\n}\n\n\nfunction room_Load() {\n  input_string = \"Hello String!\";\n}[/code]\n\n[*] [b][tt]AgsImGui.InputTextMultiline[/tt][/b]\n\n[code]static String AgsImGui.InputTextMultiline(String label, String text_buffer, int buffer_size, int width=0, int height=0, ImGuiInputTextFlags flags = 0)[/code]\n\nSame as InputText, but allows controlling the input size and supports multiline text.\n\n[*] [b][tt]AgsImGui.InputTextWithHint[/tt][/b]\n\n[code]static String AgsImGui.InputTextWithHint(String label, String hint, String text_buffer, int buffer_size, ImGuiInputTextFlags flags = 0)[/code]\n\nSame as InputText, but supports passing an input hint text.\n\n[hr]\n\n[i][b]Widgets: Combobox commands[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginCombo[/tt][/b]\n\n[code]static bool AgsImGui.BeginCombo(String label, String preview_value, ImGuiComboFlags flags = 0);[/code]\n\nThe BeginCombo()/EndCombo() allows to manage your contents and selection state however you want it, by creating e.g. Selectable() items.\n\nExample:\n[code=AGS]\nbool option1;\nbool option2;\nif(AgsImGui.BeginCombo(\"My combo\",\"click me!\")){\n  option1 = AgsImGui.Selectable(\"Option 1\");\n  option2 = AgsImGui.Selectable(\"Option 2\");\n  AgsImGui.EndCombo();\n}\n[/code]\n\n[*] [b][tt]AgsImGui.EndCombo[/tt][/b]\n\n[code]static void EndCombo()[/code]\n\nOnly call EndCombo() if BeginCombo() returns true!\n\n[hr]\n\n[i][b]Widgets: List Boxes commands[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginListBox[/tt][/b]\n\n[code]static bool AgsImGui.BeginListBox(String label, int items_count, int height_in_items = -1);[/code]\n\nThe BeginListBox()/EndListBox() allows to manage your contents and selection state however you want it, by creating e.g. Selectable() items.\n\nExample:\n[code=AGS]\nbool option1;\nbool option2;\nif(AgsImGui.BeginListBox(\"My ListBox\",2)){\n  option1 = AgsImGui.Selectable(\"Option 1\");\n  option2 = AgsImGui.Selectable(\"Option 2\");\n  AgsImGui.EndListBox();\n}\n[/code]\n\n[*] [b][tt]AgsImGui.EndListBox[/tt][/b]\n\n[code]static void AgsImGui.EndListBox()[/code]\n\nOnly call EndListBox() if BeginListBox() returns true!\n\n[hr]\n\n[i][b]Widgets: Trees[/b][/i]\n\nTreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.\n\n[*] [b][tt]AgsImGui.TreeNode[/tt][/b]\n\n[code]static bool AgsImGui.TreeNode(String label)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreeNodeWithID[/tt][/b]\n\n[code]static bool AgsImGui.TreeNodeWithID(String str_id, String text)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreeNodeV[/tt][/b]\n\n[code]static bool AgsImGui.TreeNodeV(String str_id, String text)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreeNodeEx[/tt][/b]\n\n[code]static bool AgsImGui.TreeNodeEx(String label, ImGuiTreeNodeFlags flags = 0)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreeNodeExWithID[/tt][/b]\n\n[code]static bool AgsImGui.TreeNodeExWithID(String str_id, ImGuiTreeNodeFlags flags, String text)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreeNodeExV[/tt][/b]\n\n[code]static bool AgsImGui.TreeNodeExV(String str_id, ImGuiTreeNodeFlags flags, String text)[/code]\n\nShow the contents and call TreePop() at the end, if this returns true.\n\n[*] [b][tt]AgsImGui.TreePush[/tt][/b]\n\n[code]static void AgsImGui.TreePush(String str_id)[/code]\n\n~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.\n\n[*] [b][tt]AgsImGui.TreePop[/tt][/b]\n\n[code]static void AgsImGuiTreePop()[/code]\n\n~ Unindent()+PopId().\n\n[*] [b][tt]AgsImGui.GetTreeNodeToLabelSpacing[/tt][/b]\n\n[code]static float AgsImGui.GetTreeNodeToLabelSpacing()[/code]\n\nHorizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode.\n\n[*] [b][tt]AgsImGui.CollapsingHeader[/tt][/b]\n\n[code]static bool AgsImGui.CollapsingHeader(String label, ImGuiTreeNodeFlags flags = 0)[/code]\n\nIf returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().\n\n[hr]\n\n[i][b]Tooltips[/b][/i]\n\nTooltip are windows following the mouse which do not take focus away.\n\nRemember we can only have one active tooltip at all times, and the last one called is the active one.\n\n[*] [b][tt]AgsImGui.BeginTooltip[/tt][/b]\n\n[code]static void AgsImGui.BeginTooltip()[/code]\n\nBegin/append a tooltip window. to create full-featured tooltip (with any kind of items). Doesn't return nothing.\n\n[*] [b][tt]AgsImGui.EndTooltip[/tt][/b]\n\n[code]static void AgsImGui.EndTooltip()[/code]\n\nAlways call after a BeginTooltip block!\n\n[*] [b][tt]AgsImGui.SetTooltip[/tt][/b]\n\n[code]static void AgsImGui.SetTooltip(String text)[/code]\n\nSet a text-only tooltip, typically use with AgsImGui.IsItemHovered(). Override any previous call to SetTooltip().\n\nExample:\n[code=AGS]\nAgsImGui.Button(\"Clicks for nothing!\");\nif(AgsImGui.IsItemHovered()) AgsImGui.SetTooltip(\"Button is hovered!\");\n\n[big][/code][/big]\n\n[i][b]Popups and Modals[/b][/i]\n\n[*] [b][tt]AgsImGui.OpenPopup[/tt][/b]\n\n[code]static void AgsImGui.OpenPopup(String str_id)[/code]\n\ncall to mark popup as open (don't call every frame!). Popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block.\n\nPopup identifiers are relative to the current ID-stack.\n\nExample:\n[code=AGS]\n// If the button is in the Window, this code goes inside the window.\nif(AgsImGui.BeginPopup(\"my_popup\")){\n  AgsImGui.Text(\"This is a popup\");\n  AgsImGui.EndPopup(); \n}\nif(AgsImGui.Button(\"open popup\"))\n{\n  AgsImGui.OpenPopup(\"my_popup\");\n}\n[/code]\n\n[*] [b][tt]AgsImGui.BeginPopup[/tt][/b]\n\n[code]static bool AgsImGui.BeginPopup(String str_id, ImGuiWindowFlags flags = 0)[/code]\n\nReturn true if the popup is open, and you can start outputting to it.\nOnly call EndPopup() if BeginPopup() returns true!\n\nGenerally you will want to run this on every frame, and it will return true once the popup has been made open,\nand return false again once it's closed.\n\n[*] [b][tt]AgsImGui.BeginPopupModal[/tt][/b]\n\n[code]static bool AgsImGui.BeginPopupModal(String name, bool has_close_button = 0, ImGuiWindowFlags flags = 0)[/code]\n\nModal dialog, a regular window with title bar, block interactions behind the modal window, and you can't close the\n modal window by clicking outside.\n\n[*] [b][tt]AgsImGui.EndPopup[/tt][/b]\n\n[code]static void AgsImGui.EndPopup()[/code]\n\nOnly call EndPopup() if BeginPopupXXX() returns true!\n\n[*] [b][tt]AgsImGui.IsPopupOpen[/tt][/b]\n\n[code]static bool AgsImGui.IsPopupOpen(String str_id)[/code]\n\nReturn true if the popup is open at the current begin-ed level of the popup stack.\n\n[*] [b][tt]AgsImGui.CloseCurrentPopup[/tt][/b]\n\n[code]static void AgsImGui.CloseCurrentPopup()[/code]\n\nClose the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.\n\n[hr]\n\n[i][b]Tab Bars, Tabs[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginTabBar[/tt][/b]\n\n[code]static bool AgsImGui.BeginTabBar(String str_id, ImGuiTabBarFlags flags = 0)[/code]\n\ncreate and append into a TabBar\n\n[*] [b][tt]AgsImGui.EndTabBar[/tt][/b]\n\n[code]static void AgsImGui.EndTabBar()[/code]\n\nonly call EndTabBar() if BeginTabBar() returns true!\n\n[*] [b][tt]AgsImGui.BeginTabItem[/tt][/b]\n\n[code]static bool AgsImGui.BeginTabItem(String label, bool has_close_button = 0, ImGuiTabItemFlags flags = 0)[/code]\n\ncreate a Tab. Returns true if the Tab is selected.\n\n[*] [b][tt]AgsImGui.EndTabItem[/tt][/b]\n\n[code]static void AgsImGui.EndTabItem()[/code]\n\nonly call EndTabItem() if BeginTabItem() returns true!\n\n[*] [b][tt]AgsImGui.SetTabItemClosed[/tt][/b]\n\n[code]static void AgsImGui.SetTabItemClosed(String tab_or_docked_window_label)[/code]\n\nnotify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.\n\n[hr]\n\n[i][b]Menus[/b][/i]\n\n[*] [b][tt]AgsImGui.BeginMenuBar[/tt][/b]\n\n[code]static bool AgsImGui.BeginMenuBar()[/code]\n\nAppend to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).\n\n[*] [b][tt]AgsImGui.EndMenuBar[/tt][/b]\n\n[code]static void AgsImGui.EndMenuBar()[/code]\n\nOnly call EndMenuBar() if BeginMenuBar() returns true!\n\n[*] [b][tt]AgsImGui.BeginMainMenuBar[/tt][/b]\n\n[code]static bool AgsImGui.BeginMainMenuBar()[/code]\n\nCreate and append to a full screen menu-bar.\n\n[*] [b][tt]AgsImGui.EndMainMenuBar[/tt][/b]\n\n[code]static void AgsImGui.EndMainMenuBar()[/code]\n\nOnly call EndMainMenuBar() if BeginMainMenuBar() returns true!\n\n[*] [b][tt]AgsImGui.BeginMenu[/tt][/b]\n\n[code]static bool AgsImGui.BeginMenu(String label, bool enabled = true)[/code]\n\nCreate a sub-menu entry. Only call EndMenu() if this returns true!\n\n[*] [b][tt]AgsImGui.EndMenu[/tt][/b]\n\n[code]static void AgsImGui.EndMenu()[/code]\n\nOnly call EndMenu() if BeginMenu() returns true!\n\n[*] [b][tt]AgsImGui.MenuItem[/tt][/b]\n\n[code]static bool AgsImGui.MenuItem(String label, String shortcut, bool selected = false, bool enabled = true)[/code]\n\nreturn true when activated. shortcuts are displayed for convenience but not processed by ImGui at the moment!\n\n[hr]\n\n[i][b]General Helpers[/b][/i]\n\n[*] [b][tt]AgsImGuiHelper.SetClipboarText[/tt][/b]\n\n[code]static void AgsImGuiHelper.SetClipboarText(String text)[/code]\n\n[*] [b][tt]AgsImGuiHelper.GetClipboarText[/tt][/b]\n\n[code]static String AgsImGuiHelper.GetClipboarText()[/code]\n\n[hr]\n\n\n[i][b]ImVec2[/b][/i]\n\nThis is a format used to describe either x,y points or zero origin rectangles and other things that can be described as vectors.\nIt's used more in the attributes of a [tt]ImGuiStyle[/tt] object.\n\n\n[i][b]ImVec4[/b][/i]\n\nThis is a format used to describe either x,y,w,z points or any origin rectangles and other things that can be described as vectors with 4 coordinates.\nIt's the preferable format for ImGui Colors, and used a lot for this! It's used more in the attributes of a [tt]ImGuiStyle[/tt] object.\n\n\n[i][b]ImGuiStyle[/b][/i]\n\nA big object used to describe the theme in ImGui.\n\n\n[i][b]Enums[/b][/i]\n\n[code]ImGuiCond[/code]\n\n[list]\n[*] [tt]eImGuiCond_Always[/tt], used when condition should always trigger, is usually the default when the AgImGui API requires\nconditions.\n[*] [tt]eImGuiCond_Once[/tt], Set the variable once per runtime session (only the first call with succeed).\n[*] [tt]eImGuiCond_FirstUseEver[/tt], Set the variable if the object/window has no persistently saved data (no entry in .ini file).\n[*] [tt]eImGuiCond_Appearing[/tt], Set the variable if the object/window is appearing after being hidden/inactive (or the first time).\n[/list]\n\n[code]ImGuiDir[/code]\n\n[list]\n[*] [tt]eImGuiDir_Left[/tt], left direction.\n[*] [tt]eImGuiDir_Right[/tt], right direction.\n[*] [tt]eImGuiDir_Up[/tt], up direction.\n[*] [tt]eImGuiDir_Down[/tt], down direction.\n[/list]\n\n[code]ImGuiBeginWindow[/code]\n\nobs: This is exclusive to AgsImGui implementation because in AGS we don't have pointers to primitive types.\n\nIn any cases below, you still have to call [tt]AgsImGui.EndWindow()[/tt].\n\n[list]\n[*] [tt]eImGuiBeginWindow_OK[/tt], the window is open.\n[*] [tt]eImGuiBeginWindow_Collapsed[/tt], the window is collapsed (using the arrow at top left).\n[*] [tt]eImGuiBeginWindow_OK_Closed[/tt] the window is closed. This value is only returned at mouse release frame, after clicking on close button!\n[*] [tt]eImGuiBeginWindow_Collapsed_Closed[/tt] the window is both collapsed and closed, rare but theoretically possible.\n[/list]\n\n[code]ImGuiWindowFlags[/code]\n\n[list]\n[*] [tt]eImGuiWindowFlags_None[/tt] (= 0), Default.\n[*] [tt]eImGuiWindowFlags_NoTitleBar[/tt], Disable title-bar\n[*] [tt]eImGuiWindowFlags_NoResize[/tt], Disable user resizing with the lower-right grip\n[*] [tt]eImGuiWindowFlags_NoMove[/tt],  Disable user moving the window\n[*] [tt]eImGuiWindowFlags_NoScrollbar[/tt], Disable scrollbars (window can still scroll with mouse or programmatically)\n[*] [tt]eImGuiWindowFlags_NoScrollWithMouse[/tt], Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.\n[*] [tt]eImGuiWindowFlags_NoCollapse[/tt], Disable user collapsing window by double-clicking on it\n[*] [tt]eImGuiWindowFlags_AlwaysAutoResize[/tt], Resize every window to its content every frame\n[*] [tt]eImGuiWindowFlags_NoBackground[/tt],Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f).\n[*] [tt]eImGuiWindowFlags_NoSavedSettings[/tt], Never load/save settings in .ini file\n[*] [tt]eImGuiWindowFlags_NoMouseInputs[/tt], Disable catching mouse, hovering test with pass through.\n[*] [tt]eImGuiWindowFlags_MenuBar[/tt], Has a menu-bar\n[*] [tt]eImGuiWindowFlags_HorizontalScrollbar[/tt], Allow horizontal scrollbar to appear (off by default).\n[*] [tt]eImGuiWindowFlags_NoFocusOnAppearing[/tt], Disable taking focus when transitioning from hidden to visible state\n[*] [tt]eImGuiWindowFlags_NoBringToFrontOnFocus[/tt], Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)\n[*] [tt]eImGuiWindowFlags_AlwaysVerticalScrollbar[/tt], Always show vertical scrollbar (even if ContentSize.y \u003c Size.y)\n[*] [tt]eImGuiWindowFlags_AlwaysHorizontalScrollbar[/tt], Always show horizontal scrollbar (even if ContentSize.x \u003c Size.x)\n[*] [tt]eImGuiWindowFlags_AlwaysUseWindowPadding[/tt], Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)\n[*] [tt]eImGuiWindowFlags_NoNavInputs[/tt], No gamepad/keyboard navigation within the window\n[*] [tt]eImGuiWindowFlags_NoNavFocus[/tt], No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)\n[*] [tt]eImGuiWindowFlags_UnsavedDocument[/tt], Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator.\n[*] [tt]eImGuiWindowFlags_NoNav[/tt], Disable navigation.\n[*] [tt]eImGuiWindowFlags_NoDecoration[/tt], Disable decoration.\n[*] [tt]eImGuiWindowFlags_NoInputs[/tt], Disable inputs.\n[/list]\n\n[code]enum ImGuiInputTextFlags[/code]\n\nThe enums of this type can be combined with bitwise operators.\n\n[list]\n[*] [tt]eImGuiInputTextFlags_None[/tt], (=0) default\n[*] [tt]eImGuiInputTextFlags_CharsDecimal[/tt], Allow 0123456789.+-*/\n[*] [tt]eImGuiInputTextFlags_CharsHexadecimal[/tt], Allow 0123456789ABCDEFabcdef\n[*] [tt]eImGuiInputTextFlags_CharsUppercase[/tt], Turn a..z into A..Z\n[*] [tt]eImGuiInputTextFlags_CharsNoBlank[/tt], Filter out spaces, tabs\n[*] [tt]eImGuiInputTextFlags_AutoSelectAll[/tt], Select entire text when first taking mouse focus\n[*] [tt]eImGuiInputTextFlags_EnterReturnsTrue[/tt], Return 'true' when Enter is pressed (as opposed to every time the value was modified).\n[*] [tt]eImGuiInputTextFlags_CallbackCompletion[/tt], Callback on pressing TAB (for completion handling)\n[*] [tt]eImGuiInputTextFlags_CallbackHistory[/tt], Callback on pressing Up/Down arrows (for history handling)\n[*] [tt]eImGuiInputTextFlags_CallbackAlways[/tt], Callback on each iteration. User tt may query cursor position, modify text buffer.\n[*] [tt]eImGuiInputTextFlags_CallbackCharFilter[/tt], Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.\n[*] [tt]eImGuiInputTextFlags_AllowTabInput[/tt], Pressing TAB input a 't' character into the text field\n[*] [tt]eImGuiInputTextFlags_CtrlEnterForNewLine[/tt], In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).\n[*] [tt]eImGuiInputTextFlags_NoHorizontalScroll[/tt], Disable following the cursor horizontally\n[*] [tt]eImGuiInputTextFlags_AlwaysInsertMode[/tt], Insert mode\n[*] [tt]eImGuiInputTextFlags_ReadOnly[/tt], Read-only mode\n[*] [tt]eImGuiInputTextFlags_Password[/tt], Password mode, display all characters as '*'\n[[/cur]] [tt]eImGuiInputTextFlags_NoUndoRedo[/tt], Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().\n[*] [tt]eImGuiInputTextFlags_CharsScientific[/tt], Allow 0123456789.+-*/eE (Scientific notation input)\n[*] [tt]eImGuiInputTextFlags_CallbackResize[/tt], Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow.\n[/list]\n\n[code]enum ImGuiCol_[/code]\n\nThe enums of this type can be combined with bitwise operators.\n\nUsed for selecting a specific color from the [tt]ImGuiStyle.Colors[][/tt] property. An example usage would be:\n\n[code=AGS]\nImGuiStyle* style = ImGui.GetStyle();\nstyle.Colors[eImGuiCol_WindowBg] = ImVec4.Create(1.0, 0.0, 0.0, 0.0);\nImGui.SetStyle(style);\n[/code]\n\nThis would use the enum [tt]eImGuiCol_WindowBg[/tt] to access the desired color you want to modify,\nwhich in the example sets to a red color.\n\n[list]\n[*] [tt]eImGuiCol_Text[/tt],\n[*] [tt]eImGuiCol_TextDisabled[/tt],\n[*] [tt]eImGuiCol_WindowBg[/tt], Background of normal windows\n[*] [tt]eImGuiCol_ChildBg[/tt], Background of child windows\n[*] [tt]eImGuiCol_PopupBg[/tt], Background of popups, menus, tooltips windows\n[*] [tt]eImGuiCol_Border[/tt],\n[*] [tt]eImGuiCol_BorderShadow[/tt],\n[*] [tt]eImGuiCol_FrameBg[/tt], Background of checkbox, radio button, plot, slider, text input\n[*] [tt]eImGuiCol_FrameBgHovered[/tt],\n[*] [tt]eImGuiCol_FrameBgActive[/tt],\n[*] [tt]eImGuiCol_TitleBg[/tt],\n[*] [tt]eImGuiCol_TitleBgActive[/tt],\n[*] [tt]eImGuiCol_TitleBgCollapsed[/tt],\n[*] [tt]eImGuiCol_MenuBarBg[/tt],\n[*] [tt]eImGuiCol_ScrollbarBg[/tt],\n[*] [tt]eImGuiCol_ScrollbarGrab[/tt],\n[*] [tt]eImGuiCol_ScrollbarGrabHovered[/tt],\n[*] [tt]eImGuiCol_ScrollbarGrabActive[/tt],\n[*] [tt]eImGuiCol_CheckMark[/tt],\n[*] [tt]eImGuiCol_SliderGrab[/tt],\n[*] [tt]eImGuiCol_SliderGrabActive[/tt],\n[*] [tt]eImGuiCol_Button[/tt],\n[*] [tt]eImGuiCol_ButtonHovered[/tt],\n[*] [tt]eImGuiCol_ButtonActive[/tt],\n[*] [tt]eImGuiCol_Header[/tt], Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem\n[*] [tt]eImGuiCol_HeaderHovered[/tt],\n[*] [tt]eImGuiCol_HeaderActive[/tt],\n[*] [tt]eImGuiCol_Separator[/tt],\n[*] [tt]eImGuiCol_SeparatorHovered[/tt],\n[*] [tt]eImGuiCol_SeparatorActive[/tt],\n[*] [tt]eImGuiCol_ResizeGrip[/tt],\n[*] [tt]eImGuiCol_ResizeGripHovered[/tt],\n[*] [tt]eImGuiCol_ResizeGripActive[/tt],\n[*] [tt]eImGuiCol_Tab[/tt],\n[*] [tt]eImGuiCol_TabHovered[/tt],\n[*] [tt]eImGuiCol_TabActive[/tt],\n[*] [tt]eImGuiCol_TabUnfocused[/tt],\n[*] [tt]eImGuiCol_TabUnfocusedActive[/tt],\n[*] [tt]eImGuiCol_PlotLines[/tt],\n[*] [tt]eImGuiCol_PlotLinesHovered[/tt],\n[*] [tt]eImGuiCol_PlotHistogram[/tt],\n[*] [tt]eImGuiCol_PlotHistogramHovered[/tt],\n[*] [tt]eImGuiCol_TextSelectedBg[/tt],\n[*] [tt]eImGuiCol_DragDropTarget[/tt],\n[*] [tt]eImGuiCol_NavHighlight[/tt], Gamepad/keyboard: current highlighted item;\n[*] [tt]eImGuiCol_NavWindowingHighlight[/tt], Highlight window when using CTRL+TAB;\n[*] [tt]eImGuiCol_NavWindowingDimBg[/tt], Darken/colorize entire screen behind the CTRL+TAB window list, when active;\n[*] [tt]eImGuiCol_ModalWindowDimBg[/tt], Darken/colorize entire screen behind a modal window, when one is active;\n[*] [tt]eImGuiCol_COUNT[/tt], The total numbers of items in ImGuiStyle.Colors attribute array. Useful for iterating all colors.\n[/list]\n[/spoiler]\n\n[b][size=12pt]FAQ[/size][/b]\n\n[i][b]How do I make mouse wheel work?[/b][/i]\n\nFirst, make sure you have mouse wheel support enabled in Global Settings.\n\nThen, in some script, add the code below. Note: If the script is a Room script, it will only work in that room.\n[code=AGS Script]\nvoid on_mouse_click (int btn){\n  if(btn == eMouseWheelNorth){\n    AgsImGui.DoMouseWheel(eImGuiDir_Down);\n  } else if(btn == eMouseWheelSouth){\n    AgsImGui.DoMouseWheel(eImGuiDir_Up);    \n  }  \n}\n[/code]\nFor now, mouse wheel events are not exposed in the AGS Plugin API, so you have to do it through script. In the future, if this changes, it will be integrated in the plugin.\n\n\n[b][size=12pt]License and Author[/size][/b]\n\nAgsImGui is made by eri0o provided with MIT [url=https://github.com/ericoporto/agsimgui/blob/master/LICENSE]LICENSE[/url].\n\nUsing ocornut Dear ImGui, and also using software renderer with modifications from LAK132, and using other changes to ensure AGS compatibility, provided with MIT License.\n\nAdditionally using David Cappelo clip library for providing cross platform clipboard integration, also provided with MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoporto%2Fagsimgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericoporto%2Fagsimgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoporto%2Fagsimgui/lists"}