Huge thanks go to the thegwydd for his work bringing the Dear ImGui User Interface Library to Orx.
You can easily generate a Dear ImGui project using init
from the github version of Orx.
This article assumes that you have downloaded the latest version of Orx from github and have built Orx.
There are two ways to create a Dear ImGui project. Firstly, using Interactive Mode:
init
Then follow all the prompts and choose yes
when asked if you want to include Dear ImGui:
[Extension] imgui: Dear ImGui support (https://github.com/ocornut/imgui)? (no)
The second way is to specify everything on the commandline:
init myGameFolder/MyGame +imgui
Load your new Dear ImGui project using your favourite IDE. You'll find your build in the build
folder.
Compile and run. You should get a nice screen with demo gui controls.
And just for some extra flair, add a little up/down movement to the logo in your main config file:
[Object] Graphic = @ Texture = logo.png Pivot = center AngularVelocity = 18 FXList = FadeIn # ColorCycle # MoveAround [MoveAround] SlotList = @ Type = position StartTime = 0.0 EndTime = 4 Curve = sine StartValue = (0,0) EndValue = (0, -300) Loop = true
You can also create an orx/Scroll-based Dear ImGui project. See: Creating your own orx/Scroll project using 'init'
To get started learning how to use the UI Library, check the official repo page: https://github.com/ocornut/imgui
You can also find the previous guide for Orx and Dear ImGui here: guide to create the imgui_orx library and demo project.