VISU - PHP Game Framework

MouseButton
in package

Table of Contents

Constants

BUTTON_1  = GLFW_MOUSE_BUTTON_1
BUTTON_2  = GLFW_MOUSE_BUTTON_2
BUTTON_3  = GLFW_MOUSE_BUTTON_3
BUTTON_4  = GLFW_MOUSE_BUTTON_4
BUTTON_5  = GLFW_MOUSE_BUTTON_5
BUTTON_6  = GLFW_MOUSE_BUTTON_6
BUTTON_7  = GLFW_MOUSE_BUTTON_7
BUTTON_8  = GLFW_MOUSE_BUTTON_8
LAST  = GLFW_MOUSE_BUTTON_LAST
We warp the GLFW mouse button constants to allow a syntax like this:
LEFT  = GLFW_MOUSE_BUTTON_LEFT
MIDDLE  = GLFW_MOUSE_BUTTON_MIDDLE
RIGHT  = GLFW_MOUSE_BUTTON_RIGHT

Constants

BUTTON_1

public mixed BUTTON_1 = GLFW_MOUSE_BUTTON_1

BUTTON_2

public mixed BUTTON_2 = GLFW_MOUSE_BUTTON_2

BUTTON_3

public mixed BUTTON_3 = GLFW_MOUSE_BUTTON_3

BUTTON_4

public mixed BUTTON_4 = GLFW_MOUSE_BUTTON_4

BUTTON_5

public mixed BUTTON_5 = GLFW_MOUSE_BUTTON_5

BUTTON_6

public mixed BUTTON_6 = GLFW_MOUSE_BUTTON_6

BUTTON_7

public mixed BUTTON_7 = GLFW_MOUSE_BUTTON_7

BUTTON_8

public mixed BUTTON_8 = GLFW_MOUSE_BUTTON_8

LAST

We warp the GLFW mouse button constants to allow a syntax like this:

public mixed LAST = GLFW_MOUSE_BUTTON_LAST
$input->getMouseButtonState(MouseButton::LEFT) === INPUT::PRESS

MIDDLE

public mixed MIDDLE = GLFW_MOUSE_BUTTON_MIDDLE

        
On this page

Search results