Aha, there is a typo in "scenemanager.lua". Transition function called "SceneManager.crossfade" (note lower case "f"), but on wiki it is "SceneManager.crossFade".
Seems like I know why icons loading does not work correctly. According to ImGui docs, I need to call
io.Fonts->Build();
But it leads to a crush for whatever reason... So I made my version:
int Bake(lua_State* L){
ImGuiIO&io= getIO(L);io.Fonts->ClearTexData();// this part of the code also executes when ImGui instance is created
unsigned char* pixels;
int width, height;io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
g_id texture = gtexture_create(width, height, GTEXTURE_RGBA, GTEXTURE_UNSIGNED_BYTE, GTEXTURE_CLAMP, GTEXTURE_LINEAR, pixels, NULL, 0);io.Fonts->TexID =(void *)texture;return0;}
I think I need to delete/reuse texture created with "gtexture_create". @hgy29 what do you think?) gtexture_delete() does not help. gtexture_update() does not work. Hmm... I need to somehow make Build() work...
The idea was to multiply alpha (or whataver) by a decay factor each frame. If multiple frames have to be computed at once (because of a lag for example), then the multiplication has to be done that number of frames, hence the exponentiation. The advantage of multiplication is that it mimics physical properties, were a fraction of energy is lost every amount of time, like the discharge of a capacitance. This is in fact much more natural than a linear decay. And it solves computational issues, such as clamping the result to prevent it from going negative, etc.
Pull request: https://github.com/gideros/gideros/pull/503 @hgy29 Ive made changes to make files (but not to xcode proj file), but I guess you better to check Added new file: imgui_tables.cpp Removed binder.cpp
@hgy29 is that ok to leave destructor empty? I think I need to delete clipper pointer, but idk how to do it. Or maybe GC (or Gideros) will do the job for me?) Typical use: P.S. ImGuiListClipper is a simple struct. P.P.S. There is a typo on 2d screenshot
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Changed "ImGui:colorConvertXXXtoXXX" functions. Now it must be called without ImGui instance. Just use "." instead of ":" (ImGui.colorConvertHEXtoRGB(0xfaef08))
@rrraptor How do you set the colours for a style generally - eg to set the dark theme colours, etc - or create a new theme?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
BTW, it's a pity that you can't have an icon and gradient shading in window title bars, buttons, etc. Could this be added in the future or will it deviate from the official imgui too much?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@SinisterSoft , i don't know about gradients but it seems that in ImGui for icons the suggested way is to use a custom font which contains all your icons and then you can include it easily anywhere where text can be used.
No, I mean nice coloured icons (see my screenshot above)....
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
Transition function called "SceneManager.crossfade" (note lower case "f"), but on wiki it is "SceneManager.crossFade".
Likes: MoKaLux, SinisterSoft
Transition function should be "SceneManager.crossFade" for consistency, I thought I had made a pull request for this
Likes: SinisterSoft
Seems like I know why icons loading does not work correctly.
According to ImGui docs, I need to call
I think I need to delete/reuse texture created with "gtexture_create". @hgy29 what do you think?)gtexture_delete() does not help.
gtexture_update() does not work.
Hmm... I need to somehow make Build() work...
BUT! Now I know that
So, I guess the problem somewhere In drawing stuff ... ?Edit: Nope...
Idk how to trace this error
Likes: MoKaLux, hgy29, SinisterSoft
https://github.com/gideros/gideros/blob/81022d9e2fc84072af43aed33834ee21f6da633b/2dsg/particles.cpp#L328
How to calculate decayAlpha to make particles fade out smoothly?) Same question for other "decay"s.
Wouldnt it be better to use multiplication instead of exponentiation? Or just add extra modifier?
The advantage of multiplication is that it mimics physical properties, were a fraction of energy is lost every amount of time, like the discharge of a capacitance. This is in fact much more natural than a linear decay. And it solves computational issues, such as clamping the result to prevent it from going negative, etc.
crossFade: https://github.com/gideros/gideros/pull/502
https://github.com/ocornut/imgui/releases/tag/v1.80
Likes: keszegh, SinisterSoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/MultiPain/Gideros_ImGui#tables
Likes: MoKaLux
https://github.com/MultiPain/Gideros_examples/tree/master/ImGuiTablesDemo
Seems like everything works OK.
Pull request: https://github.com/gideros/gideros/pull/503
@hgy29 Ive made changes to make files (but not to xcode proj file), but I guess you better to check
Added new file: imgui_tables.cpp
Removed binder.cpp
Likes: MoKaLux
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Typical use:
P.S. ImGuiListClipper is a simple struct.
P.P.S. There is a typo on 2d screenshot
Likes: MoKaLux, SinisterSoft
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
https://deluxepixel.com
You will get the string:
For others:
https://github.com/MultiPain/Gideros_ImGui#style-settersgetters
Default themes:
https://github.com/MultiPain/Gideros_ImGui#default-styles
Likes: SinisterSoft
https://deluxepixel.com
Full code must be:
Likes: SinisterSoft
Likes: MoKaLux
https://deluxepixel.com
BTW, it's a pity that you can't have an icon and gradient shading in window title bars, buttons, etc. Could this be added in the future or will it deviate from the official imgui too much?
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://deluxepixel.com
then @rrraptor might have a workaround.
Fragmenter - animated loop machine and IKONOMIKON - the memory game