27 lines
717 B
C++
27 lines
717 B
C++
|
|
#include "State/EditorUtilityWindowRequestState.h"
|
||
|
|
|
||
|
|
namespace XCEngine::UI::Editor::App {
|
||
|
|
|
||
|
|
void ResetEditorUtilityWindowRequestState(EditorUtilityWindowRequestState& state) {
|
||
|
|
state = {};
|
||
|
|
}
|
||
|
|
|
||
|
|
void RequestEditorUtilityWindow(
|
||
|
|
EditorUtilityWindowRequestState& state,
|
||
|
|
EditorUtilityWindowKind kind) {
|
||
|
|
if (kind == EditorUtilityWindowKind::None) {
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
state.pendingKind = kind;
|
||
|
|
}
|
||
|
|
|
||
|
|
std::optional<EditorUtilityWindowKind> ConsumeEditorUtilityWindowRequest(
|
||
|
|
EditorUtilityWindowRequestState& state) {
|
||
|
|
const std::optional<EditorUtilityWindowKind> requestedKind = state.pendingKind;
|
||
|
|
state.pendingKind.reset();
|
||
|
|
return requestedKind;
|
||
|
|
}
|
||
|
|
|
||
|
|
} // namespace XCEngine::UI::Editor::App
|