27 #include "../ui_nodes.h"
29 #include "../../cl_shared.h"
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)
55 #define DAN_WIDTH 2048
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)
struct mapExtraData_s mapExtraData_t
void calcAndUploadDayAndNightTexture(uiNode_t *node, float q)
Applies alpha values to the night overlay image for 2d geoscape.
void smoothRotate(uiNode_t *node)
smooth rotation of the 3D geoscape
void smoothTranslate(uiNode_t *node)
smooth translation of the 2D geoscape
bool onScroll(uiNode_t *node, int deltaX, int deltaY) override
void startMouseShifting(uiNode_t *node, int x, int y)
void onLoading(uiNode_t *node) override
Called before loading. Used to set default attribute values.
void zoom(uiNode_t *node, bool out)
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 UI_RegisterGeoscapeNode(uiBehaviour_t *behaviour)
void onCapturedMouseMove(uiNode_t *node, int x, int y) override
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 onCapturedMouseLost(uiNode_t *node) override
Called when the node have lost the captured node We clean cached data.
void draw(uiNode_t *node) override
Atomic structure used to define most of the UI.
void onLeftClick(uiNode_t *node, int x, int y) override
node behaviour, how a node work
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.