Difference between revisions of "Dear ImGui"

From GiderosMobile
Line 33: Line 33:
 
[[ImGui:endWindow]] ''pops window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops window from the stack-->
 
[[ImGui:endWindow]] ''pops window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops window from the stack-->
 
[[ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
 
[[ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
 +
[[ImGui:getStyle]] ''accesses the Style structure (colors, sizes)''<br/><!--GIDEROSMTD:ImGui:getStyle() accesses the Style structure (colors, sizes)-->
 
[[ImGui:newFrame]] ''starts a new ImGui frame''<br/><!--GIDEROSMTD:ImGui:newFrame(dt) starts a new ImGui frame-->
 
[[ImGui:newFrame]] ''starts a new ImGui frame''<br/><!--GIDEROSMTD:ImGui:newFrame(dt) starts a new ImGui frame-->
 
[[ImGui:render]] ''ends the ImGui frame, finalizes the draw data''<br/><!--GIDEROSMTD:ImGui:render() ends the ImGui frame, finalizes the draw data-->
 
[[ImGui:render]] ''ends the ImGui frame, finalizes the draw data''<br/><!--GIDEROSMTD:ImGui:render() ends the ImGui frame, finalizes the draw data-->

Revision as of 00:02, 23 March 2021

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2020.9

Description

This is an implementation of the Dear ImGui library.

See full original documentation here: https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html


To use Dear ImGui in your project you need to add the ImGui plugin and call require like so:

require 'ImGui'


This is a brand new plugin in Gideros Studio so it may take some time to document it thoroughly.

In the meantime, the author's GitHub is the best place to get info regarding Dear ImGui Gideros functions.

https://github.com/MultiPain/Gideros_ImGui


Of course, Gideros Wiki is here to help as well. You will find below some Dear ImGui examples implemented in Gideros Studio. ImGui_Examples

Methods

ImGui.new initializes ImGui

ImGui:beginWindow pushes window to the stack and starts appending to it
ImGui:endFrame ends the ImGui frame
ImGui:endWindow pops window from the stack
ImGui:getIO accesses the IO structure (mouse/keyboard/gamepad inputs...)
ImGui:getStyle accesses the Style structure (colors, sizes)
ImGui:newFrame starts a new ImGui frame
ImGui:render ends the ImGui frame, finalizes the draw data
ImGui:setLightStyle sets a light color style
ImGui:showDemoWindow displays an ImGui demo
ImGui:showMetricsWindow displays an ImGui metrics window
ImGui:text displays an ImGui text
ImGui:textColored displays an ImGui colored text

WORK IN PROGRESS...

Events

ImGui.KeyChar
ImGui.KeyDown
ImGui.KeyUp
ImGui.MouseDown
ImGui.MouseHover
ImGui.MouseMove
ImGui.MouseUp
ImGui.MouseWheel
ImGui.TouchBegin
ImGui.TouchEnd
ImGui.TouchCancel
ImGui.TouchMove

Constants

ImGui._VERSION