#include "../ui_nodes.h"
#include "../ui_input.h"
#include "../ui_parse.h"
#include "../ui_actions.h"
#include "ui_node_abstractnode.h"
#include "ui_node_map.h"
#include "../../client.h"
#include "../../cl_game.h"
#include "../../campaign/cp_campaign.h"
#include "../../campaign/cp_map.h"
#include "../../renderer/r_draw.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA_TYPE mapExtraData_t |
#define | EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE) |
#define | EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Enumerations | |
enum | mapDragMode_t { MODE_NULL, MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, MODE_ZOOMMAP } |
Functions | |
static void | UI_MapNodeDraw (uiNode_t *node) |
static void | UI_MapNodeCapturedMouseMove (uiNode_t *node, int x, int y) |
static void | UI_MapNodeMouseDown (uiNode_t *node, int x, int y, int button) |
static void | UI_MapNodeMouseUp (uiNode_t *node, int x, int y, int button) |
static void | UI_MapNodeCapturedMouseLost (uiNode_t *node) |
Called when the node have lost the captured node We clean cached data. | |
static void | UI_MapNodeZoom (uiNode_t *node, qboolean out) |
static void | UI_MapNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y) |
static void | UI_MapNodeZoomIn (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_MapNodeZoomOut (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_MapNodeLoading (uiNode_t *node) |
Called before loading. Used to set default attribute values. | |
void | UI_RegisterMapNode (uiBehaviour_t *behaviour) |
Variables | |
static int | oldMousePosX = 0 |
static int | oldMousePosY = 0 |
static mapDragMode_t | mode = MODE_NULL |
static const value_t | properties [] |
Definition in file ui_node_map.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, EXTRADATA_TYPE) |
Definition at line 39 of file ui_node_map.c.
#define EXTRADATA_TYPE mapExtraData_t |
Definition at line 38 of file ui_node_map.c.
#define EXTRADATACONST | ( | node | ) | UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Definition at line 40 of file ui_node_map.c.
enum mapDragMode_t |
Definition at line 56 of file ui_node_map.c.
static void UI_MapNodeCapturedMouseLost | ( | uiNode_t * | node | ) | [static] |
Called when the node have lost the captured node We clean cached data.
Definition at line 179 of file ui_node_map.c.
References MODE_NULL.
Referenced by UI_RegisterMapNode().
static void UI_MapNodeCapturedMouseMove | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Definition at line 67 of file ui_node_map.c.
References ccs_s::angles, ccs, ccs_s::center, cl_mapzoommax, cl_mapzoommin, i, ccs_s::mapSize, MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, MODE_ZOOMMAP, mousePosX, mousePosY, oldMousePosX, oldMousePosY, PITCH, qfalse, ROTATE_SPEED, cvar_s::value, YAW, and ccs_s::zoom.
Referenced by UI_RegisterMapNode().
static void UI_MapNodeDraw | ( | uiNode_t * | node | ) | [static] |
Definition at line 42 of file ui_node_map.c.
References CP_IsRunning(), MAP_DrawMap(), pos, R_PopClipRect(), R_PushClipRect(), uiNode_s::size, and UI_GetNodeAbsPos().
Referenced by UI_RegisterMapNode().
static void UI_MapNodeLoading | ( | uiNode_t * | node | ) | [static] |
Called before loading. Used to set default attribute values.
Definition at line 219 of file ui_node_map.c.
References uiNode_s::color, and Vector4Set.
Referenced by UI_RegisterMapNode().
static void UI_MapNodeMouseDown | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 130 of file ui_node_map.c.
References cl_3dmap, cvar_s::integer, K_MOUSE2, K_MOUSE3, MAP_StopSmoothMovement(), MODE_NULL, MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, MODE_ZOOMMAP, oldMousePosX, oldMousePosY, and UI_SetMouseCapture().
Referenced by UI_RegisterMapNode().
static void UI_MapNodeMouseUp | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 156 of file ui_node_map.c.
References K_MOUSE2, K_MOUSE3, MODE_NULL, MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, MODE_ZOOMMAP, and UI_MouseRelease().
Referenced by UI_RegisterMapNode().
Definition at line 201 of file ui_node_map.c.
References UI_MapNodeZoom().
Referenced by UI_RegisterMapNode().
Definition at line 184 of file ui_node_map.c.
References ccs, ccs_s::center, cl_3dmap, cl_mapzoommax, cl_mapzoommin, cvar_s::integer, MAP_StopSmoothMovement(), cvar_s::value, and ccs_s::zoom.
Referenced by UI_MapNodeMouseWheel(), UI_MapNodeZoomIn(), and UI_MapNodeZoomOut().
static void UI_MapNodeZoomIn | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 206 of file ui_node_map.c.
References qfalse, and UI_MapNodeZoom().
static void UI_MapNodeZoomOut | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 211 of file ui_node_map.c.
References qtrue, and UI_MapNodeZoom().
void UI_RegisterMapNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 235 of file ui_node_map.c.
References uiBehaviour_s::capturedMouseLost, uiBehaviour_s::capturedMouseMove, uiBehaviour_s::draw, EXTRADATA_TYPE, uiBehaviour_s::extraDataSize, uiBehaviour_s::leftClick, uiBehaviour_s::loading, MAP_MapClick(), uiBehaviour_s::mouseDown, uiBehaviour_s::mouseUp, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, uiBehaviour_s::properties, UI_MapNodeCapturedMouseLost(), UI_MapNodeCapturedMouseMove(), UI_MapNodeDraw(), UI_MapNodeLoading(), UI_MapNodeMouseDown(), UI_MapNodeMouseUp(), and UI_MapNodeMouseWheel().
mapDragMode_t mode = MODE_NULL [static] |
Definition at line 65 of file ui_node_map.c.
int oldMousePosX = 0 [static] |
Definition at line 63 of file ui_node_map.c.
Referenced by UI_MapNodeCapturedMouseMove(), and UI_MapNodeMouseDown().
int oldMousePosY = 0 [static] |
Definition at line 64 of file ui_node_map.c.
Referenced by UI_MapNodeCapturedMouseMove(), and UI_MapNodeMouseDown().
const value_t properties[] [static] |
{ {"padding-right", V_FLOAT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, paddingRight), MEMBER_SIZEOF(EXTRADATA_TYPE, paddingRight)}, {"zoomin", V_UI_NODEMETHOD, ((size_t) UI_MapNodeZoomIn), 0}, {"zoomout", V_UI_NODEMETHOD, ((size_t) UI_MapNodeZoomOut), 0}, {NULL, V_NULL, 0, 0} }
Definition at line 225 of file ui_node_map.c.