Refine editor viewport and interaction workflow
This commit is contained in:
34
editor/src/UI/MenuCommand.h
Normal file
34
editor/src/UI/MenuCommand.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
namespace XCEngine {
|
||||
namespace Editor {
|
||||
namespace UI {
|
||||
|
||||
enum class MenuCommandKind {
|
||||
Action,
|
||||
Separator
|
||||
};
|
||||
|
||||
struct MenuCommand {
|
||||
MenuCommandKind kind = MenuCommandKind::Action;
|
||||
const char* label = nullptr;
|
||||
const char* shortcut = nullptr;
|
||||
bool selected = false;
|
||||
bool enabled = true;
|
||||
|
||||
static MenuCommand Action(
|
||||
const char* label,
|
||||
const char* shortcut = nullptr,
|
||||
bool selected = false,
|
||||
bool enabled = true) {
|
||||
return MenuCommand{ MenuCommandKind::Action, label, shortcut, selected, enabled };
|
||||
}
|
||||
|
||||
static MenuCommand Separator() {
|
||||
return MenuCommand{ MenuCommandKind::Separator, nullptr, nullptr, false, true };
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace UI
|
||||
} // namespace Editor
|
||||
} // namespace XCEngine
|
||||
Reference in New Issue
Block a user