Lines Matching refs:state
26 // This test displays the state of every button and axis of every connected
123 static void hat_widget(struct nk_context* nk, unsigned char state)
143 if (state)
155 const float cosa = nk_cos(angles[state]);
156 const float sina = nk_sin(angles[state]);
260 GLFWgamepadstate state;
265 nk_label(nk, "Joystick state", NK_TEXT_LEFT);
293 if (glfwGetGamepadState(joysticks[i], &state))
305 "Gamepad state: %s",
311 nk_slide_float(nk, -1.f, state.axes[j], 1.f, 0.1f);
316 nk_select_label(nk, names[j], NK_TEXT_CENTERED, state.buttons[j]);
318 if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_UP])
320 if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_RIGHT])
322 if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_DOWN])
324 if (state.buttons[GLFW_GAMEPAD_BUTTON_DPAD_LEFT])