28 lines
737 B
C
28 lines
737 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <XCEngine/UI/DrawData.h>
|
||
|
|
|
||
|
|
namespace XCEngine::UI::Editor::Widgets {
|
||
|
|
|
||
|
|
struct UIEditorFieldRowLayoutMetrics {
|
||
|
|
float rowHeight = 22.0f;
|
||
|
|
float horizontalPadding = 12.0f;
|
||
|
|
float labelControlGap = 20.0f;
|
||
|
|
float controlColumnStart = 236.0f;
|
||
|
|
float controlTrailingInset = 8.0f;
|
||
|
|
float controlInsetY = 1.0f;
|
||
|
|
};
|
||
|
|
|
||
|
|
struct UIEditorFieldRowLayout {
|
||
|
|
::XCEngine::UI::UIRect bounds = {};
|
||
|
|
::XCEngine::UI::UIRect labelRect = {};
|
||
|
|
::XCEngine::UI::UIRect controlRect = {};
|
||
|
|
};
|
||
|
|
|
||
|
|
UIEditorFieldRowLayout BuildUIEditorFieldRowLayout(
|
||
|
|
const ::XCEngine::UI::UIRect& bounds,
|
||
|
|
float minimumControlWidth,
|
||
|
|
const UIEditorFieldRowLayoutMetrics& metrics = {});
|
||
|
|
|
||
|
|
} // namespace XCEngine::UI::Editor::Widgets
|