ui_node_map.c File Reference

#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"
Include dependency graph for ui_node_map.c:

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 []

Detailed Description

Definition in file ui_node_map.c.


Define Documentation

#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.


Enumeration Type Documentation

Enumerator:
MODE_NULL 
MODE_SHIFT2DMAP 
MODE_SHIFT3DMAP 
MODE_ZOOMMAP 

Definition at line 56 of file ui_node_map.c.


Function Documentation

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]
static void UI_MapNodeDraw ( uiNode_t node  )  [static]
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]
static void UI_MapNodeMouseUp ( uiNode_t node,
int  x,
int  y,
int  button 
) [static]
static void UI_MapNodeMouseWheel ( uiNode_t node,
qboolean  down,
int  x,
int  y 
) [static]

Definition at line 201 of file ui_node_map.c.

References UI_MapNodeZoom().

Referenced by UI_RegisterMapNode().

static void UI_MapNodeZoom ( uiNode_t node,
qboolean  out 
) [static]
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  ) 

Variable Documentation

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]
Initial value:
 {
    
    {"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.


Generated by  doxygen 1.6.2