VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
vex::Widget Struct Reference

Struct defining widget component, it has a lot of redundancy and probably will need cleanup before expanding on a feature. More...

#include <VexUI.hpp>

Public Member Functions

void applyLayout (VexUI *uiManager)

Public Attributes

WidgetType type = WidgetType::Container
std::string id
std::string text
std::string image
UIUnitVec2 size
float rotation = 0.f
UIStyle style
nlohmann::json nodeJson
LayoutNodelayoutNode = nullptr
std::vector< Widget * > children
Widgetparent = nullptr
std::function< void()> onClick = nullptr
std::function< void()> onFocusEnter = nullptr
std::function< void()> onFocusLost = nullptr
VexUIui = nullptr
TextAlign textAlign = TextAlign::Left

Detailed Description

Struct defining widget component, it has a lot of redundancy and probably will need cleanup before expanding on a feature.

Definition at line 113 of file VexUI.hpp.

Constructor & Destructor Documentation

◆ ~Widget()

vex::Widget::~Widget ( )

Definition at line 333 of file VexUI.cpp.

Member Function Documentation

◆ applyLayout()

void vex::Widget::applyLayout ( VexUI * uiManager)

Definition at line 337 of file VexUI.cpp.

Member Data Documentation

◆ children

std::vector<Widget*> vex::Widget::children

Definition at line 126 of file VexUI.hpp.

◆ id

std::string vex::Widget::id

Definition at line 115 of file VexUI.hpp.

◆ image

std::string vex::Widget::image

Definition at line 117 of file VexUI.hpp.

◆ layoutNode

LayoutNode* vex::Widget::layoutNode = nullptr

Definition at line 125 of file VexUI.hpp.

◆ nodeJson

nlohmann::json vex::Widget::nodeJson

Definition at line 123 of file VexUI.hpp.

◆ onClick

std::function<void()> vex::Widget::onClick = nullptr

Definition at line 128 of file VexUI.hpp.

◆ onFocusEnter

std::function<void()> vex::Widget::onFocusEnter = nullptr

Definition at line 129 of file VexUI.hpp.

◆ onFocusLost

std::function<void()> vex::Widget::onFocusLost = nullptr

Definition at line 130 of file VexUI.hpp.

◆ parent

Widget* vex::Widget::parent = nullptr

Definition at line 127 of file VexUI.hpp.

◆ rotation

float vex::Widget::rotation = 0.f

Definition at line 120 of file VexUI.hpp.

◆ size

UIUnitVec2 vex::Widget::size

Definition at line 119 of file VexUI.hpp.

◆ style

UIStyle vex::Widget::style

Definition at line 121 of file VexUI.hpp.

◆ text

std::string vex::Widget::text

Definition at line 116 of file VexUI.hpp.

◆ textAlign

TextAlign vex::Widget::textAlign = TextAlign::Left

Definition at line 132 of file VexUI.hpp.

◆ type

WidgetType vex::Widget::type = WidgetType::Container

Definition at line 114 of file VexUI.hpp.

◆ ui

VexUI* vex::Widget::ui = nullptr

Definition at line 131 of file VexUI.hpp.


The documentation for this struct was generated from the following files: