Code: Select all
menuSound.loadSound("hover_sound", "Audio/Sound/button_hover_sound1.wav", 0.5);
Beispiel für diese Schaltfläche:
Code: Select all
if (ImGui::Button("Respawn", ImVec2(500, 60)))
{
menuSound.playSound("select_sound");
camera.cameraPhysics.position = glm::vec3(55.0f, 5.0f, 5.0f);
camera.cameraPhysics.velocity = glm::vec3(0.0f);
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
ImGui::End();
gui.endFrame();
return GAME_STATE_PLAYING;
}
Mobile version