Comments (3)
I was wondering whether that functionality is somehow added/addable through CImGui.jl?
It looks like this feature is already in ocornut's TODO list, it would be great if it could come into 1.70. Since CImGui.jl is just a wrapper and not able to provide additional internal features like this one, the only feasible way is to manually patch imgui and expose that API like what CImGuiBuilder did here.
from cimgui.jl.
Now those internal APIs are supported in CImGui.LibCImGui
, so we can implement this on the Julia side:
julia> using CImGui, CImGui.LibCImGui
julia> include(joinpath(pathof(CImGui), "..", "..", "examples", "Renderer.jl"))
Main.Renderer
julia> using .Renderer
julia> Renderer.render(width = 360, height = 480, title = "IMGUI Window") do
CImGui.CSyntax.@cstatic disabled=false begin
CImGui.Begin("Hello ImGui")
CImGui.CSyntax.@c CImGui.Checkbox("Disable", &disabled)
if disabled
igPushItemFlag(ImGuiItemFlags_Disabled, true)
CImGui.PushStyleVar(ImGuiStyleVar_Alpha, 0.5)
end
CImGui.Button("My Button") && @show "trigger"
if disabled
igPopItemFlag()
CImGui.PopStyleVar()
end
CImGui.End()
end
end
from cimgui.jl.
Great! Thanks for the example
I'll close this but if I come across any issues will reopen
from cimgui.jl.
Related Issues (20)
- Broken after update HOT 8
- Incomplete overlap HOT 4
- UndefVarError: `igSetScrollYFloat` not defined HOT 1
- Example of integrating a GLMakie plot in a CImGui window (or conversely) HOT 8
- `AddRect()` error: "`ImDrawCornerFlags_All` not defined" HOT 4
- Help / About Dear ImGui / Config/Build information throws an error HOT 1
- Create a CImGui sample application ie running outside of Julia CLI (from PowerShell commandline) HOT 9
- Window dimensions are always reported as 400x400 HOT 2
- Example code doesn't actually run HOT 6
- Input widgets with different IDs conflict with each other? HOT 6
- How can I get ImGuiWindowClass?
- The getproperty and setproperty! method of ImNodesStyle was not provided
- On some Windows machine, got glfwCreateWindow error HOT 5
- Regenerate new wrapper libraries for fresh ImGui and ImPlot versions? HOT 1
- An error occurs when I use ImGuiTextFilter in a package
- SDL Backend Support? HOT 6
- I can not run the demo HOT 5
- ImGuiKey_KeyPadEnter not defined, when running demo HOT 2
- Upgrading Guide: 1.79 to 1.82
- Expand tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cimgui.jl.