hailiang194 / NeoSekaiEngine

Sekai Game engine - my 2D game engine built base on what I know about game development. This game engine can run on Windows, Linux and Web platform
MIT License
0 stars 0 forks source link

How can I know mouse button is down #8

Closed hailiang194 closed 6 months ago

hailiang194 commented 6 months ago

As what I written in the title. Who can I know that?

hailiang194 commented 6 months ago

Hi, currently we have SekaiEngine::Input::IsButtonPressed for check if the mouse button is clicked. However, we have forgotten to implement the flags for mouse button so you can use raw value of raylib for the key flags because you can't access directly to raylib here the flags

    MOUSE_BUTTON_LEFT    = 0,       // Mouse button left
    MOUSE_BUTTON_RIGHT   = 1,       // Mouse button right
    MOUSE_BUTTON_MIDDLE  = 2,       // Mouse button middle (pressed wheel)
    MOUSE_BUTTON_SIDE    = 3,       // Mouse button side (advanced mouse device)
    MOUSE_BUTTON_EXTRA   = 4,       // Mouse button extra (advanced mouse device)
    MOUSE_BUTTON_FORWARD = 5,       // Mouse button forward (advanced mouse device)
    MOUSE_BUTTON_BACK    = 6,       // Mouse button back (advanced mouse device)

We're gonna update it in next update. Thank you!

hailiang194 commented 6 months ago

Good morning, those flags has been updated in v0.1.0. Check it out