the thing is that with a different imgui project it works fine, so there is some issue somewhere inside the specific code. at some point i've noticed that instead of on each enterframe i call my imgui refresh code at every 1000/60 ms with a timer, so practically on each enterframe but differently. i hoped this is the issue but changing to enterframe did not help.
the thing is that with a different imgui project it works fine, so there is some issue somewhere inside the specific code. at some point i've noticed that instead of on each enterframe i call my imgui refresh code at every 1000/60 ms with a timer, so practically on each enterframe but differently. i hoped this is the issue but changing to enterframe did not help.
one fishy thing is that if i set if imgui:isMouseClicked(KeyCode.MOUSE_RIGHT) then print("clicked") end for some item then even if i press right mouse on the item once and keep it down it will be triggered again and again (while as i understand it should be printed only once even if i keep the button pressed for a long time). this seems to be the same issue somehow as the backspace one.
@rrraptor , i've sent the project in pm. so also with this isMouseClicked thing it seems that between two frame events somehow imgui 'forgets' that the button (key or mouse) is already pressed and thinks that it was pressed again even though it is already in a down position since last time.
genius, thanks for spotting that. indeed i've changed it for some reason when adding my imgui code to my main code. i just could not see what use would it be good for passing anything to enterframe (and in turn to newFrame()). something about this should be added to the documentation of newFrame().
now having this newFrame issue corrected, the modal popup greys out the background. as it greys out even areas not part of the gui i'm not sure i want this, can i turn off this feature?
now having this newFrame issue corrected, the modal popup greys out the background. as it greys out even areas not part of the gui i'm not sure i want this, can i turn off this feature?
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
Maybe a solution would be some kind of imgui parameter to do a callback when keyboard input is required and a way to insert keys into the input stream?
That way the app can draw their own keyboard on a sprite above the user interface if needed?
OR
Add a soft keyboard to imgui that can be enabled or disabled programatically?
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
Maybe a solution would be some kind of imgui parameter to do a callback when keyboard input is required and a way to insert keys into the input stream?
There is a "IO:AddInputCharactersUTF8(text)" function but its not availiable from LUA side. I'll add this function later.
@rrraptor does imgui have some kind of 'built-in' soft keyboard?
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
i have a strange issue, i made a small gadget which when dragged resizes a disk-shaped image. but after a few drags it just starts to act strangely. namely, afterwards one has to pull the mouse a 'lot' just to change the int value by 1:
i have a strange issue, i made a small gadget which when dragged resizes a disk-shaped image. but after a few drags it just starts to act strangely. namely, afterwards one has to pull the mouse a 'lot' just to change the int value by 1:
EDIT: but the bug still persists, especially if i change to another app and then change back to the gideros player after which the dragint tends to go wrong.
btw if i don't do any tricks with the dragint (i.e. no alpha change nor format change) then i cannot make it go wrong, whatever i do. EDIT: now i managed to. so there is some general bug with dragInt. how one can trigger it: drag the dragInt, then release, then alt-tab back and forth to some other window (i'm using win10) and then try to drag it again, it will become much slower to change (that is, it needs huge drag distance to change a bit).
EDIT: you don't even need to drag first. just run the app, alt-tab back and forth and then every dragInt (e.g. also the ones inside a colorEdit3 popup) will go wrong.
btw if i don't do any tricks with the dragint (i.e. no alpha change nor format change) then i cannot make it go wrong, whatever i do. EDIT: now i managed to. so there is some general bug with dragInt. how one can trigger it drag the dragInt, then release, then alt-tab back and forth to some other window (i'm using win10) and then try to drag it again, it will become much slower to change (that is, it needs huge drag distance to change a bit).
Aha, so thats the answer. Every slider widget slows down when you hold ALT key. This is the code to capture ALT/CTRL/SHIFT/SUPER keys: https://github.com/MultiPain/Gideros_ImGui/blob/e2b102686b22f635fafaf6e92ef3d57dc3f506f7/main.cpp#L1085 From gideros side its just 2 event listeners (key up, key down) where I set flag to true or false. So, to fix this I shuld add a function to reset all keys And a few functions to set flags:
yes, you got it right, i think i had a related issue in the past where ALT etc. state is incorrect after switching back and forth to another app with ALT-TAB. so please correct it in the source if that's doable.
i think these get the correct info even after an ALT-TAB switch. it may help you to correct the bug.
all in all the moral is that listening to keyup/down events is not the safe way to get modifier button states due to possible app-switchings.
Ok, Ill try to fix it this way, but there is still a bug with the mouse. Hold ALT -> drag slider -> ALT TAB -> release mouse -> ALT TAB again -> move the mouse. Can be fixed like this for now (in upcoming version):
Hm, but there is a problem with icons When running on a FRESH gideros player its OK, but when you restart they will never come back. disappear sometimes...
Hm, but there is a problem with icons When running on a FRESH gideros player its OK, but when you restart they will never come back. disappear sometimes...
strange. for now i don't use utf icons, i decided otherwise. but in general this is a very useful feature of imgui.
I've seen that imgui has 'tooltips'. How would you add a tooltip to a button?
I've tried beginTooltip(), setTooltip("my tip!") before the button and endTooltip() after the button, but it just seems to display the tooltip everywhere.
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
can you tell me how to set the width of an imageButtonWithText manually? the parameters are only for the image but i want also the whole button to have a certain width. thanks
Comments
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Can you send ur project then?
if imgui:isMouseClicked(KeyCode.MOUSE_RIGHT) then print("clicked") end
for some item then even if i press right mouse on the item once and keep it down it will be triggered again and again (while as i understand it should be printed only once even if i keep the button pressed for a long time).
this seems to be the same issue somehow as the backspace one.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
so also with this isMouseClicked thing it seems that between two frame events somehow imgui 'forgets' that the button (key or mouse) is already pressed and thinks that it was pressed again even though it is already in a down position since last time.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
UI:render()
UI:endFrame()
in your demo it is like that but i do the opposite order and so far it worked fine too.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Your call:
Likes: keszegh
something about this should be added to the documentation of newFrame().
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
ModalWindowDimBg
Likes: keszegh
Likes: MoKaLux, SinisterSoft, keszegh
Example
Likes: MoKaLux
They have a couple of ideas here: https://github.com/emscripten-ports/SDL2/issues/80
https://deluxepixel.com
That way the app can draw their own keyboard on a sprite above the user interface if needed?
OR
Add a soft keyboard to imgui that can be enabled or disabled programatically?
https://deluxepixel.com
Likes: MoKaLux, SinisterSoft
https://deluxepixel.com
You can look towards TextArea
Likes: SinisterSoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
EDIT: now i managed to. so there is some general bug with dragInt.
how one can trigger it:
drag the dragInt, then release, then alt-tab back and forth to some other window (i'm using win10) and then try to drag it again, it will become much slower to change (that is, it needs huge drag distance to change a bit).
EDIT: you don't even need to drag first. just run the app, alt-tab back and forth and then every dragInt (e.g. also the ones inside a colorEdit3 popup) will go wrong.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Every slider widget slows down when you hold ALT key.
This is the code to capture ALT/CTRL/SHIFT/SUPER keys: https://github.com/MultiPain/Gideros_ImGui/blob/e2b102686b22f635fafaf6e92ef3d57dc3f506f7/main.cpp#L1085
From gideros side its just 2 event listeners (key up, key down) where I set flag to true or false. So, to fix this I shuld add a function to reset all keys
And a few functions to set flags:
Likes: keszegh
so please correct it in the source if that's doable.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://wiki.gideros.rocks/index.php/Event.TOUCHES_MOVE
i think these get the correct info even after an ALT-TAB switch. it may help you to correct the bug.
all in all the moral is that listening to keyup/down events is not the safe way to get modifier button states due to possible app-switchings.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/gideros/gideros/pull/511 Ok, Ill try to fix it this way, but there is still a bug with the mouse. Hold ALT -> drag slider -> ALT TAB -> release mouse -> ALT TAB again -> move the mouse.
Can be fixed like this for now (in upcoming version):
https://github.com/MultiPain/Gideros_ImGui#glyphs-example
Here is named code points: https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.codepoints
also for the correction, i should not forget to add that suspend code when the new version comes.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
When running on a FRESH gideros player its OK, but when you restart they
will never come back.disappear sometimes...Fragmenter - animated loop machine and IKONOMIKON - the memory game
I've tried beginTooltip(), setTooltip("my tip!") before the button and endTooltip() after the button, but it just seems to display the tooltip everywhere.
https://deluxepixel.com
self:showHelpText("tooltip text")
and with _showTooltips=true/false you can globally turn on/off showing tooltips.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game