Refactor XCUI editor module layout
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEditor/Fields/UIEditorAssetField.h>
|
||||
|
||||
#include <XCEngine/UI/Types.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace XCEngine::UI::Editor {
|
||||
|
||||
struct UIEditorAssetFieldInteractionState {
|
||||
Widgets::UIEditorAssetFieldState fieldState = {};
|
||||
::XCEngine::UI::UIPoint pointerPosition = {};
|
||||
bool hasPointerPosition = false;
|
||||
};
|
||||
|
||||
struct UIEditorAssetFieldInteractionResult {
|
||||
bool consumed = false;
|
||||
bool focusChanged = false;
|
||||
bool valueChanged = false;
|
||||
bool activateRequested = false;
|
||||
bool pickerRequested = false;
|
||||
bool clearRequested = false;
|
||||
Widgets::UIEditorAssetFieldHitTarget hitTarget = {};
|
||||
std::string assetIdBefore = {};
|
||||
std::string assetIdAfter = {};
|
||||
std::string displayNameBefore = {};
|
||||
std::string displayNameAfter = {};
|
||||
};
|
||||
|
||||
struct UIEditorAssetFieldInteractionFrame {
|
||||
Widgets::UIEditorAssetFieldLayout layout = {};
|
||||
UIEditorAssetFieldInteractionResult result = {};
|
||||
};
|
||||
|
||||
UIEditorAssetFieldInteractionFrame UpdateUIEditorAssetFieldInteraction(
|
||||
UIEditorAssetFieldInteractionState& state,
|
||||
Widgets::UIEditorAssetFieldSpec& spec,
|
||||
const ::XCEngine::UI::UIRect& bounds,
|
||||
const std::vector<::XCEngine::UI::UIInputEvent>& inputEvents,
|
||||
const Widgets::UIEditorAssetFieldMetrics& metrics = {});
|
||||
|
||||
} // namespace XCEngine::UI::Editor
|
||||
Reference in New Issue
Block a user