Just a design philosophy question on the STATIC and UNIQUE definitions in imgui_demo.ts: comparing imgui_demo.ts:2576 and imgui_demo.cpp:2543 we find these two lines immediately below the multiline comment // Demonstrate a few extra things
const offset_x = STATIC<int>(UNIQUE("offset_x#22c5d833"), 0);
static int offset_x = 0;
Where does the TS port hex value come from eg 22c5d833? The use of UNIQUE makes me think of imgui's ##unique_id. But the code is not using UNIQUE to generate explicit imgui IDs, it's using them to provide unique keys for imgui_demo.ts:_static_map and _static_array_map. In other words, STATIC and UNIQUE are there to emulate C++ static behaviour?
How did you generate the hex IDs in the TS port? Did you run a hacked C++ version that dumped the imgui widget IDs as a convenient way to generate UNIQUE keys for the C++ statics?
Thanks!
Just a design philosophy question on the STATIC and UNIQUE definitions in imgui_demo.ts: comparing imgui_demo.ts:2576 and imgui_demo.cpp:2543 we find these two lines immediately below the multiline comment // Demonstrate a few extra things
Where does the TS port hex value come from eg 22c5d833? The use of UNIQUE makes me think of imgui's ##unique_id. But the code is not using UNIQUE to generate explicit imgui IDs, it's using them to provide unique keys for imgui_demo.ts:_static_map and _static_array_map. In other words, STATIC and UNIQUE are there to emulate C++ static behaviour?
How did you generate the hex IDs in the TS port? Did you run a hacked C++ version that dumped the imgui widget IDs as a convenient way to generate UNIQUE keys for the C++ statics?
Thanks!