4 ms·
The widget should keep its state private. ImGui::InputText("string", buf, IM_ARRAYSIZE(buf)); ImGui::SliderFloat("float", &f, 0.0f, 1.0f); And maybe is a C++
by dasloop 6y ago
The widget should keep its state private.
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
And maybe is a C++ lib but the interface is C with namespaces. Odd.
- perfunctory 6y agoThe way I understand it, the idea is that widgets don't own the state. They are sort of stateless. Your app owns the state.
- formerly_proven 6y agoExactly, the app owning (most of) the state is precisely the point of ImGui.
- Toenex 6y agoImmediate mode is a stateless design pattern.
- Cloudef 6y agoPublic interface with C makes sense. C++ doesn't have portable ABI plus it makes porting harder.