@keszegh are you using font(s) with icons? There is something wrong with font loading, but no idea what because I dont know how I can debug this process...
@rrraptor , i don't know what did you change, but in the new version the same code does not crash and mousePos seems to work. thanks, i can get ahead and try to use it to handle pen button as good as possible. i will let you know if i manage.
@rrraptor , i don't know what did you change, but in the new version the same code does not crash and mousePos seems to work. thanks, i can get ahead and try to use it to handle pen button as good as possible. i will let you know if i manage.
Yes, you can do that in QtCreator, just open the plug-in project and the player project, compile everything in debug mode, put breakpoints and launch the player in debug run
EDIT: please disregard this comment, i've accidentally left another instance to refresh mousePos with wrong coordinates.
@rrraptor , i have some scaling issues with mousePos. my imgui is scaled with scale imgui_scaling (a constant) and is positioned at 0,0.
i add event listeners to stage. this:
if event.type=="mouseHover"then
IO:setMousePos(event.x/imgui_scaling,event.y/imgui_scaling)end
hovers the item under the mouse cursor, it is correct. however
if event.type=="touchesBegin"then
IO:setMouseDown(0, true)
IO:setMousePos(event.touch.x/imgui_scaling,event.touch.y/imgui_scaling)end
points to a different position, not where the cursor is. (And so clicks on a different item). could you check if your code is correct or what am i doing wrong? thanks
@rrraptor , is there a function to check if the current mouse position is over any part of the imgui? the use case is to decide if i should propagate the touch event to sprites below imgui or not. (i don't need to know which item, only yes or no, but it should include menu's, windows, etc) thanks
@rrraptor , probably i should use IO:wantCaptureMouse(), but it's value is not always correct when i use a pen: at a touchesBegin i update mouse position with mousePos() and then i check IO:wantCaptureMouse() to see if it is hovering over a window (or used by some other way by imgui). works with mouse but with pen it gives the result 'false' even though i pressed the pen on a window. how is this computed?
EDIT: note that hovering the pen does not send hover info to the gideros app (i wish it would).
then when i press the pen on top of a window, guiHasMouse is still false even though it should be true. a few calls later it becomes true but it is too late as already at that point assuming that imgui does not have the mouse, i used the pen info to start to draw beneath it (And then until pen is released, drawing gets a preference, i.e., imgui is ignored).
so the above issue persists but with some manual workarounds now i can manage to handle pen button quite close to what i wanted, so thanks for all your help @rrraptor and @hgy29.
how can i force a specific window to stay on top? (even if another window is in focus - note that this focused window should come in top of all the rest of the windows, except the special one).
how can i force a specific window to stay on top? (even if another window is in focus - note that this focused window should come in top of all the rest of the windows, except the special one).
how can i force a specific window to stay on top? (even if another window is in focus - note that this focused window should come in top of all the rest of the windows, except the special one).
not exactly, as far as i understand. i have a horizontal menu spanning the bottom of the screen which i want to be always on top. see attached figure, the bottom menu should be over the rest of the windows.
@rrraptor , is there a function to check if the current mouse position is over any part of the imgui? the use case is to decide if i should propagate the touch event to sprites below imgui or not. (i don't need to know which item, only yes or no, but it should include menu's, windows, etc) thanks
@rrraptor , is there a function to check if the current mouse position is over any part of the imgui? the use case is to decide if i should propagate the touch event to sprites below imgui or not. (i don't need to know which item, only yes or no, but it should include menu's, windows, etc) thanks
I guess you can try this:
ui:getHoveredWindow()
Returns window name if any hovered, nil otherwise
thanks. there is also the top menu that should be included in the test.
@rrraptor , probably i should use IO:wantCaptureMouse(), but it's value is not always correct when i use a pen: at a touchesBegin i update mouse position with mousePos() and then i check IO:wantCaptureMouse() to see if it is hovering over a window (or used by some other way by imgui). works with mouse but with pen it gives the result 'false' even though i pressed the pen on a window. how is this computed?
EDIT: note that hovering the pen does not send hover info to the gideros app (i wish it would).
@rrraptor , probably i should use IO:wantCaptureMouse(), but it's value is not always correct when i use a pen: at a touchesBegin i update mouse position with mousePos() and then i check IO:wantCaptureMouse() to see if it is hovering over a window (or used by some other way by imgui). works with mouse but with pen it gives the result 'false' even though i pressed the pen on a window. how is this computed?
EDIT: note that hovering the pen does not send hover info to the gideros app (i wish it would).
Comments
@hgy29 is there a way to debug plugins?)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
@rrraptor , i have some scaling issues with mousePos. my imgui is scaled with scale imgui_scaling (a constant) and is positioned at 0,0.
i add event listeners to stage.
this:
however
could you check if your code is correct or what am i doing wrong?
thanks
Fragmenter - animated loop machine and IKONOMIKON - the memory game
(i don't need to know which item, only yes or no, but it should include menu's, windows, etc)
thanks
Fragmenter - animated loop machine and IKONOMIKON - the memory game
at a touchesBegin i update mouse position with mousePos() and then i check IO:wantCaptureMouse() to see if it is hovering over a window (or used by some other way by imgui). works with mouse but with pen it gives the result 'false' even though i pressed the pen on a window.
how is this computed?
EDIT: note that hovering the pen does not send hover info to the gideros app (i wish it would).
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
1 main window is always behind notification windows, is that what you need?)
Likes: MoKaLux, SinisterSoft
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
like:
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/MultiPain/ImGui-LUA-Notifications
Atleast you can change focus when mouse is overlaping bottom window.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
the imgui notification hyperlink you sent gives an error btw.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/MultiPain/Gideros_ImGui/blob/41173cca8ba5a91fa70cc6819d2af05db2b2bad9/imgui_src/imgui.cpp#L4104
Then:
https://github.com/MultiPain/Gideros_ImGui/blob/41173cca8ba5a91fa70cc6819d2af05db2b2bad9/imgui_src/imgui.cpp#L3920
And there is a function:
https://github.com/MultiPain/Gideros_ImGui/blob/41173cca8ba5a91fa70cc6819d2af05db2b2bad9/imgui_src/imgui.cpp#L4865
So, in theory you can call ImGui:captureMouseFromApp(true) after ImGui:newFrame() to fix this problem?
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh