Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Imgui crash in android player on touch — Gideros Forum

Imgui crash in android player on touch

piepie Member
This is the output as soon as I touch the screen

[1355] jni/../../Common/imgui_src/imgui.cpp: mouse_button >= 0 && mouse_button < ImGuiMouseButton_COUNT

Should I do something I missed?

Thank you

Comments

  • piepie Member
    I had no luck so far, I hope that someone else can try this project and confirm my experience.

    This is a very simple project that makes use only of the imgui demo window, and I get the same error message that I have in every other project I tried using imgui on android.

    They work in windows desktop player, but when I run them on android player they stop working as soon as I touch the screen; I even tried using a bluetooth mouse on the phone: as soon as I click the left button the player crashes
    [1355] jni/../../Common/imgui_src/imgui.cpp: mouse_button >= 0 && mouse_button < ImGuiMouseButton_COUNT
    To build the android player I exported the project as a player with imgui plugin and no assets as usual.

    thank you
    zip
    zip
    androidplayer_dummy.zip
    1M
  • keszeghkeszegh Member
    edited November 27
    i had the sameish issue, see
    https://forum.giderosmobile.com/discussion/8399/imgui-new-thread/p20

    Comment 67327

    my workaround is that i propagate the mouse/touch events manually to the imgui within ontouches begin/move/end/cancel events, and there i do something like this to change value 0 to 1 before sending to imgui:
    if event.touch.mouseButton==0 then event.touch.mouseButton=1 end	 
    IO:setMouseDown(event.touch.mouseButton, true)
    (you need to disable automatic handling of mouse events to make this work, that is, you should initialize the gui like this:
    imgui = ImGui.new(nil, false, true, false) 
    IO=getIO()
    see https://github.com/MultiPain/Gideros_ImGui/#constructor)

    Likes: pie, MoKaLux

    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.