editor: apply pending updates
This commit is contained in:
56
editor/include/XCEditor/Menu/UIEditorMenuPopupInteraction.h
Normal file
56
editor/include/XCEditor/Menu/UIEditorMenuPopupInteraction.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Menu/UIEditorMenuPopup.h>
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI {
|
||||
|
||||
struct UIInputEvent;
|
||||
|
||||
} // namespace XCEngine::UI
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorMenuPopupInteractionState {
|
||||
std::string highlightedItemId = {};
|
||||
std::string pressedItemId = {};
|
||||
bool focused = false;
|
||||
};
|
||||
|
||||
struct UIEditorMenuPopupInteractionRequest {
|
||||
Widgets::UIEditorMenuPopupLayout layout = {};
|
||||
std::vector<Widgets::UIEditorMenuPopupItem> items = {};
|
||||
std::string preferredHighlightedItemId = {};
|
||||
bool closeOnFocusLost = true;
|
||||
bool activateOnPointerDown = false;
|
||||
};
|
||||
|
||||
struct UIEditorMenuPopupInteractionResult {
|
||||
bool consumed = false;
|
||||
bool highlightChanged = false;
|
||||
bool closeRequested = false;
|
||||
bool itemActivated = false;
|
||||
std::size_t activatedIndex = Widgets::UIEditorMenuPopupInvalidIndex;
|
||||
std::string activatedItemId = {};
|
||||
};
|
||||
|
||||
struct UIEditorMenuPopupInteractionFrame {
|
||||
Widgets::UIEditorMenuPopupLayout layout = {};
|
||||
Widgets::UIEditorMenuPopupState popupState = {};
|
||||
UIEditorMenuPopupInteractionResult result = {};
|
||||
};
|
||||
|
||||
void ResetUIEditorMenuPopupInteractionState(
|
||||
UIEditorMenuPopupInteractionState& state);
|
||||
|
||||
UIEditorMenuPopupInteractionFrame UpdateUIEditorMenuPopupInteraction(
|
||||
UIEditorMenuPopupInteractionState& state,
|
||||
const UIEditorMenuPopupInteractionRequest& request,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents);
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user