35 lines
782 B
C++
35 lines
782 B
C++
#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
|