mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
feat(credits): add ESC key handling; remove about tab from dev panel
This commit is contained in:
@@ -80,7 +80,6 @@ void DevPanel::render() {
|
||||
show_player_tab_item();
|
||||
show_items_tab_item();
|
||||
show_shader_tab_item();
|
||||
show_about_table_bar();
|
||||
|
||||
ImGui::EndTabBar();
|
||||
}
|
||||
@@ -89,40 +88,6 @@ void DevPanel::render() {
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
}
|
||||
|
||||
void DevPanel::show_about_table_bar() {
|
||||
if (ImGui::BeginTabItem("about")) {
|
||||
ImGui::Text(
|
||||
"Cubed - A cube game like Minecraft, using C++ and OpenGL.");
|
||||
ImGui::Text("Author: zhenyan121");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Libraries Used");
|
||||
ImGui::Text("glad");
|
||||
ImGui::Text("GLFW");
|
||||
ImGui::Text("SOIL2");
|
||||
ImGui::Text("GLM");
|
||||
ImGui::Text("FreeType");
|
||||
ImGui::Text("toml++");
|
||||
ImGui::Text("Dear ImGui");
|
||||
ImGui::Text("Tbb");
|
||||
ImGui::Text("Asio");
|
||||
ImGui::Text("protobuf");
|
||||
ImGui::Text("zstd");
|
||||
ImGui::Text("OpenAl Soft");
|
||||
ImGui::Text("dr_libs");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Music");
|
||||
ImGui::Text("'Find a Peaceful Place' by ROZKOL (Free Music Archive), "
|
||||
"CC BY 4.0.");
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Special Thanks");
|
||||
ImGui::Text("TANGERIME");
|
||||
ImGui::Text("SkyOnPole");
|
||||
ImGui::Text("free_w_cloud");
|
||||
ImGui::Text("Last but not least, thanks to you");
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
}
|
||||
|
||||
void DevPanel::show_biome_table_bar() {
|
||||
|
||||
if (ImGui::BeginTabBar("Biome")) {
|
||||
|
||||
@@ -74,4 +74,12 @@ void CreditsUI::init() {
|
||||
m_root_widget = std::move(image);
|
||||
}
|
||||
|
||||
bool CreditsUI::handle_key_event(const KeyEvent& e) {
|
||||
if (e.key == Key::ESCAPE && e.action == KeyAction::PRESS) {
|
||||
m_scene.scene_manager().request_pop();
|
||||
return true;
|
||||
}
|
||||
return UIManager::handle_key_event(e);
|
||||
}
|
||||
|
||||
} // namespace Cubed
|
||||
Reference in New Issue
Block a user