File XMLUIGameLayer.c
FileList > engine > src > gameframework > layers > UI > XMLUIGameLayer.c
Go to the source code of this file
#include "XMLUIGameLayer.h"#include "DrawContext.h"#include "InputContext.h"#include "GameFramework.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include "IntTypes.h"#include "DynArray.h"#include "ObjectPool.h"#include "Widget.h"#include "StaticWidget.h"#include "StackPanelWidget.h"#include "Atlas.h"#include "RootWidget.h"#include "main.h"#include "TextWidget.h"#include "BackgroundBoxWidget.h"#include "Scripting.h"#include "Geometry.h"#include "AssertLib.h"#include "TextButtonWidget.h"#include "RadioButtonWidget.h"#include "RadioGroupWidget.h"#include "SliderWidget.h"#include "CanvasWidget.h"#include "TextEntryWidget.h"#include "DataNode.h"#include "StringKeyHashMap.h"#include "GameFrameworkEvent.h"#include <libxml/parser.h>#include <libxml/tree.h>#include "Log.h"#include "cwalk.h"
Public Static Attributes
| Type | Name |
|---|---|
| bool | gInitialisedNodeNameMap = false |
| struct HashMap | gNodeNameMap |
Public Functions
| Type | Name |
|---|---|
| void | AddNodeChildren (HWidget widget, xmlNode * pNode, XMLUIData * pUIData) |
| xmlNode * | GetNthChild (xmlNode * node, unsigned int index) |
| void | LoadAtlas (XMLUIData * pUIData, xmlNode * child0, DrawContext * pDC) |
| AddChildFn | LookupWidgetCtor (const char * widgetName) |
| void | XMLUIGameLayer_Get (struct GameFrameworkLayer * pLayer, struct XMLUIGameLayerOptions * pOptions) Get and possibly load (if bLoadImmediately) a ui layer defined by xml. |
| void | XMLUI_PushGameFrameworkLayer (const char * xmlPath) |
Public Static Functions
| Type | Name |
|---|---|
| void | AddLuaTableSubTree (XMLUIData * pData, HWidget hParent) |
| void * | BuildWidgetsHoverred (VECTOR(HWidget) outWidgets, HWidget hWidget, float mouseX, float mouseY) |
| void | Draw (struct GameFrameworkLayer * pLayer, DrawContext * dc) |
| void | FreeWidgetChildren (HWidget root) |
| void | FreeWidgetTree (HWidget root) |
| void | FreeWidgetTree_internal (HWidget root, bool bFreeRoot) |
| void | InitializeNodeNameMap () |
| void | InitializeWidgets (HWidget root) |
| void | Input (struct GameFrameworkLayer * pLayer, InputContext * ctx) |
| void | LoadUIData (XMLUIData * pUIData, DrawContext * pDC) |
| void | OnPop (struct GameFrameworkLayer * pLayer, DrawContext * drawContext, InputContext * inputContext) |
| void | OnPush (struct GameFrameworkLayer * pLayer, DrawContext * drawContext, InputContext * inputContext) |
| void | OnWindowSizeChanged (struct GameFrameworkLayer * pLayer, int newW, int newH) |
| bool | SendMouseDownAndFocus (struct WidgetMouseInfo * info, HWidget hWidget, XMLUIData * pUIData) |
| bool | TryLoadViewModel (XMLUIData * pUIData, xmlNode * pScreenNode) |
| void | Unfocus (XMLUIData * pUIData) |
| void | Update (struct GameFrameworkLayer * pLayer, float deltaT) |
| void | UpdateRootWidget (XMLUIData * pData, DrawContext * dc) |
Public Static Attributes Documentation
variable gInitialisedNodeNameMap
bool gInitialisedNodeNameMap;
variable gNodeNameMap
struct HashMap gNodeNameMap;
Public Functions Documentation
function AddNodeChildren
void AddNodeChildren (
HWidget widget,
xmlNode * pNode,
XMLUIData * pUIData
)
function GetNthChild
xmlNode * GetNthChild (
xmlNode * node,
unsigned int index
)
function LoadAtlas
void LoadAtlas (
XMLUIData * pUIData,
xmlNode * child0,
DrawContext * pDC
)
function LookupWidgetCtor
AddChildFn LookupWidgetCtor (
const char * widgetName
)
function XMLUIGameLayer_Get
Get and possibly load (if bLoadImmediately) a ui layer defined by xml.
void XMLUIGameLayer_Get (
struct GameFrameworkLayer * pLayer,
struct XMLUIGameLayerOptions * pOptions
)
Parameters:
pLayer(Out) layer to turn into an xml ui layerpOptionsoptions for creation
function XMLUI_PushGameFrameworkLayer
void XMLUI_PushGameFrameworkLayer (
const char * xmlPath
)
Public Static Functions Documentation
function AddLuaTableSubTree
static void AddLuaTableSubTree (
XMLUIData * pData,
HWidget hParent
)
function BuildWidgetsHoverred
static void * BuildWidgetsHoverred (
VECTOR(HWidget) outWidgets,
HWidget hWidget,
float mouseX,
float mouseY
)
function Draw
static void Draw (
struct GameFrameworkLayer * pLayer,
DrawContext * dc
)
function FreeWidgetChildren
static void FreeWidgetChildren (
HWidget root
)
function FreeWidgetTree
static void FreeWidgetTree (
HWidget root
)
function FreeWidgetTree_internal
static void FreeWidgetTree_internal (
HWidget root,
bool bFreeRoot
)
function InitializeNodeNameMap
static void InitializeNodeNameMap ()
function InitializeWidgets
static void InitializeWidgets (
HWidget root
)
function Input
static void Input (
struct GameFrameworkLayer * pLayer,
InputContext * ctx
)
function LoadUIData
static void LoadUIData (
XMLUIData * pUIData,
DrawContext * pDC
)
function OnPop
static void OnPop (
struct GameFrameworkLayer * pLayer,
DrawContext * drawContext,
InputContext * inputContext
)
function OnPush
static void OnPush (
struct GameFrameworkLayer * pLayer,
DrawContext * drawContext,
InputContext * inputContext
)
function OnWindowSizeChanged
static void OnWindowSizeChanged (
struct GameFrameworkLayer * pLayer,
int newW,
int newH
)
function SendMouseDownAndFocus
static bool SendMouseDownAndFocus (
struct WidgetMouseInfo * info,
HWidget hWidget,
XMLUIData * pUIData
)
function TryLoadViewModel
static bool TryLoadViewModel (
XMLUIData * pUIData,
xmlNode * pScreenNode
)
function Unfocus
static void Unfocus (
XMLUIData * pUIData
)
function Update
static void Update (
struct GameFrameworkLayer * pLayer,
float deltaT
)
function UpdateRootWidget
static void UpdateRootWidget (
XMLUIData * pData,
DrawContext * dc
)
The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/src/gameframework/layers/UI/XMLUIGameLayer.c