|
UFO: Alien Invasion
|
#include "../ui_main.h"#include "../ui_parse.h"#include "../ui_font.h"#include "../ui_nodes.h"#include "../ui_internal.h"#include "../ui_render.h"#include "../ui_sprite.h"#include "../ui_lua.h"#include "ui_node_window.h"#include "ui_node_panel.h"#include "ui_node_abstractnode.h"#include "../../client.h"#include "../../../common/scripts_lua.h"
Go to the source code of this file.
Macros | |
| #define | EXTRADATA_TYPE windowExtraData_t |
| #define | EXTRADATA(node) |
| #define | EXTRADATACONST(node) |
| #define | TOP_HEIGHT 30 |
Functions | |
| void | UI_Window_SetBackgroundByName (uiNode_t *node, const char *name) |
| set background sprite | |
| uiNode_t * | UI_WindowNodeGetIndexedChild (uiNode_t *const node, const char *childName) |
| Get a node from child index. | |
| bool | UI_WindowNodeAddIndexedNode (uiNode_t *const node, uiNode_t *const child) |
| Add a node to the child index. | |
| bool | UI_WindowNodeRemoveIndexedNode (uiNode_t *const node, uiNode_t *const child) |
| Remove a node from the child index. | |
| bool | UI_WindowIsFullScreen (const uiNode_t *const node) |
| Check if a window is fullscreen or not. | |
| void | UI_Window_SetCloseButton (uiNode_t *node, bool value) |
| Create/remove close button on window. | |
| void | UI_Window_SetDragButton (uiNode_t *node, bool value) |
| Create/remove drag button. | |
| void | UI_Window_FlagFullscreen (uiNode_t *node) |
| If the node size equals the full screen size, flag the node as isFullscreen, so it is displayed properly. | |
| vec_t * | UI_WindowNodeGetNoticePosition (uiNode_t *node) |
| Get the noticePosition from a window node. | |
| bool | UI_WindowIsDropDown (uiNode_t const *const node) |
| True if the window is a drop down. | |
| bool | UI_WindowIsModal (uiNode_t const *const node) |
| True if the window is a modal. | |
| void | UI_WindowNodeRegisterKeyBinding (uiNode_t *node, uiKeyBinding_t *binding) |
| Add a key binding to a window node. Window node store key bindings for his node child. | |
| uiKeyBinding_t * | UI_WindowNodeGetKeyBinding (uiNode_t const *const node, unsigned int key) |
| Search a a key binding from a window node. Window node store key bindings for his node child. | |
| void | UI_RegisterWindowNode (uiBehaviour_t *behaviour) |
Variables | |
| static const int | CONTROLS_IMAGE_DIMENSIONS = 16 |
| static const int | CONTROLS_PADDING = 8 |
| static const vec4_t | modalBackground = {0, 0, 0, 0.6} |
| static const vec4_t | anamorphicBorder = {0, 0, 0, 1} |
| static const char * | WINDOW_FONT_BIG = "f_big" |
| static const char * | WINDOW_CLOSE_BUTTON_NAME = "close_window_button" |
| static const char * | WINDOW_DRAG_BUTTON_NAME = "move_window_button" |
| const uiKeyBinding_t * | binding |
Definition in file ui_node_window.cpp.
| #define EXTRADATA | ( | node | ) |
Definition at line 42 of file ui_node_window.cpp.
Referenced by UI_Window_FlagFullscreen(), UI_Window_SetCloseButton(), UI_Window_SetDragButton(), UI_WindowNodeAddIndexedNode(), UI_WindowNodeGetIndexedChild(), UI_WindowNodeGetNoticePosition(), and UI_WindowNodeRegisterKeyBinding().
| #define EXTRADATA_TYPE windowExtraData_t |
Definition at line 41 of file ui_node_window.cpp.
| #define EXTRADATACONST | ( | node | ) |
Definition at line 43 of file ui_node_window.cpp.
Referenced by UI_WindowIsDropDown(), UI_WindowIsFullScreen(), UI_WindowIsModal(), and UI_WindowNodeGetKeyBinding().
| #define TOP_HEIGHT 30 |
Definition at line 45 of file ui_node_window.cpp.
Referenced by uiWindowNode::draw(), and UI_Window_SetDragButton().
| void UI_RegisterWindowNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 474 of file ui_node_window.cpp.
References EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_SWIG_TypeQuery(), V_BOOL, V_POS, V_UI_ACTION, and V_UI_SPRITEREF.
If the node size equals the full screen size, flag the node as isFullscreen, so it is displayed properly.
Definition at line 391 of file ui_node_window.cpp.
References uiNode_t::box, EXTRADATA, uiBox_t::size, VID_NORM_HEIGHT, and VID_NORM_WIDTH.
Referenced by uiWindowNode::onLoaded(), and uiWindowNode::onSizeChanged().
set background sprite
Definition at line 61 of file ui_node_window.cpp.
References name, UI_EXTRADATA, and UI_GetSpriteByName().
Referenced by uiWindowNode_t_set_background().
Create/remove close button on window.
Definition at line 308 of file ui_node_window.cpp.
References _, uiNode_t::behaviour, uiNode_t::box, CONTROLS_IMAGE_DIMENSIONS, CONTROLS_PADDING, uiNode_t::dynamic, EXTRADATA, uiNode_t::onClick, uiBox_t::pos, uiNode_t::root, uiBox_t::size, uiNode_t::tooltip, UI_AllocNode(), UI_AllocStaticCommandAction(), UI_AppendNode(), UI_FindNode(), UI_GetPropertyFromBehaviour(), UI_NodeSetProperty(), UI_RemoveNode(), and WINDOW_CLOSE_BUTTON_NAME.
Referenced by uiWindowNode::onLoaded(), and uiWindowNode_t_set_closebutton().
Create/remove drag button.
Definition at line 338 of file ui_node_window.cpp.
References _, uiNode_t::box, uiNode_t::dynamic, EXTRADATA, uiBox_t::pos, uiNode_t::root, uiBox_t::size, uiNode_t::tooltip, TOP_HEIGHT, UI_AllocNode(), UI_AppendNode(), UI_FindNode(), UI_GetPrevNode(), UI_InsertNode(), UI_RemoveNode(), WINDOW_CLOSE_BUTTON_NAME, and WINDOW_DRAG_BUTTON_NAME.
Referenced by uiWindowNode::onLoaded(), and uiWindowNode_t_set_dragbutton().
| bool UI_WindowIsDropDown | ( | uiNode_t const *const | node | ) |
True if the window is a drop down.
| node | A window node |
Definition at line 420 of file ui_node_window.cpp.
References EXTRADATACONST.
Referenced by UI_GetNodeAtPosition(), and UI_LeftClick().
| bool UI_WindowIsFullScreen | ( | const uiNode_t *const | node | ) |
Check if a window is fullscreen or not.
Definition at line 118 of file ui_node_window.cpp.
References EXTRADATACONST, and UI_NodeInstanceOf().
Referenced by uiWindowNode::doLayout(), uiWindowNode::draw(), UI_GetLastFullScreenWindow(), UI_GetNodeAtPosition(), and UI_MoveWindowOnTop().
| bool UI_WindowIsModal | ( | uiNode_t const *const | node | ) |
True if the window is a modal.
| node | A window node |
Definition at line 430 of file ui_node_window.cpp.
References EXTRADATACONST.
Referenced by UI_GetNodeAtPosition(), and UI_KeyPressed().
Add a node to the child index.
Definition at line 84 of file ui_node_window.cpp.
References Com_HashKey(), EXTRADATA, hash, node_index_t::hash_next, INDEXEDCHILD_HASH_SIZE, Mem_PoolAllocType, uiNode_t::name, node_index_t::next, node_index_t::node, Q_streq, and ui_sysPool.
Referenced by UI_InsertNode().
Get a node from child index.
Definition at line 70 of file ui_node_window.cpp.
References Com_HashKey(), EXTRADATA, hash, node_index_t::hash_next, INDEXEDCHILD_HASH_SIZE, and Q_streq.
Referenced by UI_ReadNodePath().
| uiKeyBinding_t * UI_WindowNodeGetKeyBinding | ( | uiNode_t const *const | node, |
| unsigned int | key ) |
Search a a key binding from a window node. Window node store key bindings for his node child.
| node | A window node |
| key | A key code, either K_ value or lowercase ascii |
Definition at line 457 of file ui_node_window.cpp.
References binding, EXTRADATACONST, key, and UI_NodeInstanceOf().
Referenced by UI_KeyPressedInWindow().
Get the noticePosition from a window node.
| node | A window node |
Definition at line 408 of file ui_node_window.cpp.
References EXTRADATA, and Vector2Empty.
Referenced by UI_DrawNotice().
| void UI_WindowNodeRegisterKeyBinding | ( | uiNode_t * | node, |
| uiKeyBinding_t * | binding ) |
Add a key binding to a window node. Window node store key bindings for his node child.
| node | A window node |
| binding | Key binding to link with the window (structure should not be already linked somewhere) |
Definition at line 442 of file ui_node_window.cpp.
References binding, EXTRADATA, and UI_NodeInstanceOf().
Referenced by UI_SetKeyBindingEx().
Remove a node from the child index.
Definition at line 109 of file ui_node_window.cpp.
Referenced by UI_RemoveNode().
|
static |
Definition at line 51 of file ui_node_window.cpp.
Referenced by uiWindowNode::draw().
| const uiKeyBinding_t* binding |
Definition at line 449 of file ui_node_window.cpp.
Referenced by CLMN_AddBindings(), CLMN_AddUIBindings(), Key_GetBinding(), Key_SetBinding(), Key_WriteBindings(), UI_KeyPressedInWindow(), UI_SetKeyBindingEx(), UI_WindowNodeGetKeyBinding(), UI_WindowNodeRegisterKeyBinding(), and UI_WindowNodeRegisterKeyBinding().
|
static |
Definition at line 47 of file ui_node_window.cpp.
Referenced by UI_Window_SetCloseButton().
|
static |
Definition at line 48 of file ui_node_window.cpp.
Referenced by uiWindowNode::doLayout(), and UI_Window_SetCloseButton().
|
static |
Definition at line 50 of file ui_node_window.cpp.
Referenced by uiWindowNode::draw().
|
static |
Definition at line 55 of file ui_node_window.cpp.
Referenced by uiWindowNode::doLayout(), UI_Window_SetCloseButton(), and UI_Window_SetDragButton().
|
static |
Definition at line 56 of file ui_node_window.cpp.
Referenced by uiWindowNode::doLayout(), and UI_Window_SetDragButton().
|
static |
Definition at line 53 of file ui_node_window.cpp.
Referenced by uiWindowNode::onLoading().