refactor: rename ui_editor to editor for consistency
This commit is contained in:
55
editor/src/panels/MenuBar.cpp
Normal file
55
editor/src/panels/MenuBar.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "MenuBar.h"
|
||||
#include <imgui.h>
|
||||
|
||||
namespace UI {
|
||||
|
||||
MenuBar::MenuBar() : Panel("MenuBar") {}
|
||||
|
||||
void MenuBar::Render() {
|
||||
if (ImGui::BeginMainMenuBar()) {
|
||||
ShowFileMenu();
|
||||
ShowEditMenu();
|
||||
ShowViewMenu();
|
||||
ShowHelpMenu();
|
||||
ImGui::EndMainMenuBar();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuBar::ShowFileMenu() {
|
||||
if (ImGui::BeginMenu("File")) {
|
||||
if (ImGui::MenuItem("New Scene", "Ctrl+N")) {}
|
||||
if (ImGui::MenuItem("Open Scene", "Ctrl+O")) {}
|
||||
if (ImGui::MenuItem("Save Scene", "Ctrl+S")) {}
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Exit", "Alt+F4")) {}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuBar::ShowEditMenu() {
|
||||
if (ImGui::BeginMenu("Edit")) {
|
||||
if (ImGui::MenuItem("Undo", "Ctrl+Z")) {}
|
||||
if (ImGui::MenuItem("Redo", "Ctrl+Y")) {}
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("Cut", "Ctrl+X")) {}
|
||||
if (ImGui::MenuItem("Copy", "Ctrl+C")) {}
|
||||
if (ImGui::MenuItem("Paste", "Ctrl+V")) {}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuBar::ShowViewMenu() {
|
||||
if (ImGui::BeginMenu("View")) {
|
||||
if (ImGui::MenuItem("Reset Layout")) {}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuBar::ShowHelpMenu() {
|
||||
if (ImGui::BeginMenu("Help")) {
|
||||
if (ImGui::MenuItem("About")) {}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user