Stardew Engine
Loading...
Searching...
No Matches
XMLUIGameLayer.h
Go to the documentation of this file.
1#ifndef XMLUI_GAME_LAYER_H
2#define XMLUI_GAME_LAYER_H
3
4#include <libxml/tree.h>
5
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#include <stdbool.h>
12#include "HandleDefs.h"
13#include "DynArray.h"
14#include "Widget.h"
15#include "DrawContext.h"
16#include "TimerPool.h"
17#include "InputContext.h"
18
19struct XMLUIData;
21struct DataNode;
22
24{
27
29 const char* xmlPath;
30
33};
34
37typedef HWidget(*AddChildFn)(HWidget hParent, struct DataNode* pDataNode, struct XMLUIData* pUILayerData);
38
39#define XML_UI_MAX_PATH 256
40#define MAX_FOCUSED_WIDGETS 16
41
42
46{
49
51 const char* funcName;
52
55};
56
57
76
77
82
83void XMLUI_PushGameFrameworkLayer(const char* xmlPath);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
vec2 vec2 struct Entity2DCollection struct GameFrameworkLayer * pLayer
Definition EntityQuadTree.h:38
HGeneric HUIVertexBuffer
Definition HandleDefs.h:24
HGeneric HWidget
Definition HandleDefs.h:8
HGeneric hAtlas
Definition HandleDefs.h:14
void XMLUI_PushGameFrameworkLayer(const char *xmlPath)
Definition XMLUIGameLayer.c:750
void XMLUIGameLayer_Get(struct GameFrameworkLayer *pLayer, struct XMLUIGameLayerOptions *pOptions)
Get and possibly load (if bLoadImmediately) a ui layer defined by xml.
Definition XMLUIGameLayer.c:721
#define XML_UI_MAX_PATH
Definition XMLUIGameLayer.h:39
HWidget(* AddChildFn)(HWidget hParent, struct DataNode *pDataNode, struct XMLUIData *pUILayerData)
Function pointer typedef for adding a new widget, described by pDataNode as a child of hParent should...
Definition XMLUIGameLayer.h:37
#define MAX_FOCUSED_WIDGETS
Definition XMLUIGameLayer.h:40
Definition InputContext.h:181
Definition InputContext.h:187
Definition DataNode.h:53
Definition DrawContext.h:59
Definition GameFramework.h:42
Definition TimerPool.h:35
Definition DrawContext.h:27
its a "request" because if an ancenstor of the requesting widget also requests then the request is ov...
Definition XMLUIGameLayer.h:46
HWidget hWidget
Widget that will have new children.
Definition XMLUIGameLayer.h:54
const char * funcName
Function that will generate new children for the widget.
Definition XMLUIGameLayer.h:51
int regIndex
Registry index of the viewmodel table the function will be called on.
Definition XMLUIGameLayer.h:48
Definition XMLUIGameLayer.h:59
const char * xmlData
Definition XMLUIGameLayer.h:62
char xmlFilePath[XML_UI_MAX_PATH]
Definition XMLUIGameLayer.h:61
HWidget rootWidget
Definition XMLUIGameLayer.h:60
hAtlas atlas
Definition XMLUIGameLayer.h:64
int hViewModel
Definition XMLUIGameLayer.h:67
struct SDTimerPool timerPool
Definition XMLUIGameLayer.h:70
struct AxisBinding gMouseX
Definition XMLUIGameLayer.h:72
VECTOR(WidgetVertex) pWidgetVertices
HUIVertexBuffer hVertexBuffer
Definition XMLUIGameLayer.h:66
int nFocusedWidgets
Definition XMLUIGameLayer.h:69
struct ButtonBinding gMouseBtnLeft
Definition XMLUIGameLayer.h:74
bool bLoaded
Definition XMLUIGameLayer.h:63
VECTOR(struct WidgetChildrenChangeRequest) pChildrenChangeRequests
struct AxisBinding gMouseY
Definition XMLUIGameLayer.h:73
HWidget focusedWidgets[MAX_FOCUSED_WIDGETS]
Definition XMLUIGameLayer.h:68
Definition XMLUIGameLayer.h:24
bool bLoadImmediately
eg, when XMLUIGameLayer_Get is called, do we load the xml file?
Definition XMLUIGameLayer.h:32
DrawContext * pDc
draw context (should really just be globally accessible: TODO: fix)
Definition XMLUIGameLayer.h:26
const char * xmlPath
path to xml file defining the UI
Definition XMLUIGameLayer.h:29