51#define UI_MAPEXTRADATA_TYPE mapExtraData_t
52#define UI_MAPEXTRADATA(node) UI_EXTRADATA(node, UI_MAPEXTRADATA_TYPE)
53#define UI_MAPEXTRADATACONST(node) UI_EXTRADATACONST(node, UI_MAPEXTRADATA_TYPE)
56#define DAN_HEIGHT 1024
62#define STANDARD_3D_ZOOM 40.0f
64#define EARTH_RADIUS 8192.0f
65#define MOON_RADIUS 1024.0f
66#define SUN_RADIUS 1024.0f
69#define GLOBE_RADIUS EARTH_RADIUS * (UI_MAPEXTRADATACONST(node).zoom / STANDARD_3D_ZOOM)
71typedef struct mapExtraData_s {
Share stuff between the different cgame implementations.
void onLoading(uiNode_t *node) override
Called before loading. Used to set default attribute values.
void screenToMap(const uiNode_t *node, int x, int y, vec2_t pos)
Return longitude and latitude of a point of the screen for 2D geoscape.
void screenTo3DMap(const uiNode_t *node, int x, int y, vec2_t pos)
Return longitude and latitude of a point of the screen for 3D geoscape (globe).
void smoothTranslate(uiNode_t *node)
smooth translation of the 2D geoscape
void startMouseShifting(uiNode_t *node, int x, int y)
void onMouseUp(uiNode_t *node, int x, int y, int button) override
bool onStartDragging(uiNode_t *node, int startX, int startY, int currentX, int currentY, int button) override
Send mouse event when a pressed mouse button is dragged.
void calcAndUploadDayAndNightTexture(uiNode_t *node, float q)
Applies alpha values to the night overlay image for 2d geoscape.
void onCapturedMouseLost(uiNode_t *node) override
Called when the node have lost the captured node We clean cached data.
void draw(uiNode_t *node) override
void smoothRotate(uiNode_t *node)
smooth rotation of the 3D geoscape
bool onScroll(uiNode_t *node, int deltaX, int deltaY) override
void zoom(uiNode_t *node, bool out)
void onCapturedMouseMove(uiNode_t *node, int x, int y) override
void onLeftClick(uiNode_t *node, int x, int y) override
node behaviour, how a node work
Atomic structure used to define most of the UI.
void UI_RegisterGeoscapeNode(uiBehaviour_t *behaviour)