|
UFO: Alien Invasion
|
#include <ui_node_geoscape.h>


Public Member Functions | |
| void | draw (uiNode_t *node) override |
| void | onMouseUp (uiNode_t *node, int x, int y, int button) override |
| void | onCapturedMouseMove (uiNode_t *node, int x, int y) override |
| void | onCapturedMouseLost (uiNode_t *node) override |
| Called when the node have lost the captured node We clean cached data. | |
| void | onLoading (uiNode_t *node) override |
| Called before loading. Used to set default attribute values. | |
| bool | onScroll (uiNode_t *node, int deltaX, int deltaY) override |
| void | onLeftClick (uiNode_t *node, int x, int y) 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 | zoom (uiNode_t *node, bool out) |
| void | startMouseShifting (uiNode_t *node, int x, int y) |
| Public Member Functions inherited from uiLocatedNode | |
| virtual void | drawTooltip (const uiNode_t *node, int x, int y) const |
| virtual void | drawOverWindow (uiNode_t *node) |
| virtual void | doLayout (uiNode_t *node) |
| Call to update the node layout. This common code revalidates the node tree. | |
| virtual void | onSizeChanged (uiNode_t *node) |
| Callback stub. | |
| virtual void | onRightClick (uiNode_t *node, int x, int y) |
| virtual void | onMiddleClick (uiNode_t *node, int x, int y) |
| virtual void | onMouseMove (uiNode_t *node, int x, int y) |
| virtual void | onMouseDown (uiNode_t *node, int x, int y, int button) |
| virtual bool | onMouseLongPress (uiNode_t *node, int x, int y, int button) |
| Send mouse event when a pressed mouse button is dragged. | |
| virtual void | onMouseEnter (uiNode_t *node) |
| virtual void | onMouseLeave (uiNode_t *node) |
| virtual bool | onDndEnter (uiNode_t *node) |
| virtual bool | onDndMove (uiNode_t *node, int x, int y) |
| virtual void | onDndLeave (uiNode_t *node) |
| virtual bool | onDndDrop (uiNode_t *node, int x, int y) |
| virtual bool | onDndFinished (uiNode_t *node, bool isDropped) |
| virtual void | onFocusGained (uiNode_t *node) |
| virtual void | onFocusLost (uiNode_t *node) |
| virtual bool | onKeyPressed (uiNode_t *node, unsigned int key, unsigned short unicode) |
| virtual bool | onKeyReleased (uiNode_t *node, unsigned int key, unsigned short unicode) |
| virtual void | getClientPosition (uiNode_t const *node, vec2_t position) |
| virtual int | getCellWidth (uiNode_t *node) |
| virtual int | getCellHeight (uiNode_t *node) |
| Public Member Functions inherited from uiNode | |
| virtual void | onLoaded (uiNode_t *node) |
| virtual void | clone (uiNode_t const *source, uiNode_t *clone) |
| virtual void | initNode (uiNode_t *node) |
| virtual void | initNodeDynamic (uiNode_t *node) |
| virtual void | deleteNode (uiNode_t *node) |
| virtual void | onWindowOpened (uiNode_t *node, linkedList_t *params) |
| virtual void | onWindowClosed (uiNode_t *node) |
| virtual void | onWindowActivate (uiNode_t *node) |
| virtual void | onActivate (uiNode_t *node) |
| Activate the node. Can be used without the mouse (ie. a button will execute onClick). | |
| virtual void | onPropertyChanged (uiNode_t *node, const value_t *property) |
| virtual | ~uiNode () |
Protected Member Functions | |
| void | smoothTranslate (uiNode_t *node) |
| smooth translation of the 2D geoscape | |
| void | smoothRotate (uiNode_t *node) |
| smooth rotation of the 3D 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 | 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 | calcAndUploadDayAndNightTexture (uiNode_t *node, float q) |
| Applies alpha values to the night overlay image for 2d geoscape. | |
Definition at line 31 of file ui_node_geoscape.h.
Applies alpha values to the night overlay image for 2d geoscape.
| [in] | node | The current menuNode we have clicked on (3dmap or map) |
| [in] | q | The angle the sun is standing against the equator on earth |
Definition at line 178 of file ui_node_geoscape.cpp.
References COS_ALPHA, DAN_HEIGHT, DAN_WIDTH, DAWN, HIGH_LAT, LOW_LAT, M_PI, r_dayandnightTexture, R_UploadAlpha(), SIN_ALPHA, and UI_MAPEXTRADATA.
Referenced by draw().
How to draw a node
Reimplemented from uiLocatedNode.
Definition at line 214 of file ui_node_geoscape.cpp.
References uiNode_t::box, calcAndUploadDayAndNightTexture(), cl_3dmap, cl_3dmapAmbient, cl_mapzoommax, cl_mapzoommin, Cvar_GetValue(), data, DateTime::DAYS_PER_YEAR, GAME_DrawMap(), GAME_DrawMapMarkers(), geoscapeNode, M_PI, r_dayandnightTexture, R_Draw3DGlobe(), R_DrawBloom(), R_DrawFlatGeoscape(), R_EnableRenderbuffer(), r_radarTexture, r_xviTexture, DateTime::SECONDS_PER_DAY, DateTime::SECONDS_PER_HOUR, uiBox_t::size, smoothRotate(), smoothTranslate(), UI_GetNodeAbsPos(), UI_GetNodeScreenPos(), UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, UI_PopClipRect(), UI_PushClipRect(), Vector2Copy, and zoom().
Called when the node have lost the captured node We clean cached data.
Reimplemented from uiLocatedNode.
Definition at line 484 of file ui_node_geoscape.cpp.
References MODE_NULL.
Mouse move event in the node when captured
Reimplemented from uiLocatedNode.
Definition at line 291 of file ui_node_geoscape.cpp.
References uiNode_t::box, i, MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, MODE_ZOOMMAP, mousePosX, mousePosY, oldMousePosX, oldMousePosY, PITCH, ROTATE_SPEED, uiBox_t::size, UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, YAW, and zoom().
Left mouse click event in the node
Reimplemented from uiLocatedNode.
Definition at line 439 of file ui_node_geoscape.cpp.
References GAME_MapClick(), MODE_NULL, screenTo3DMap(), screenToMap(), and UI_MAPEXTRADATACONST.
Called before loading. Used to set default attribute values.
this is the data that is used with r_dayandnightTexture
Reimplemented from uiNode.
Definition at line 522 of file ui_node_geoscape.cpp.
References uiNode_t::color, DAN_HEIGHT, DAN_WIDTH, EXTRADATA, geoscapeData, GLOBE_ROTATE, it_effect, Mem_AllocTypeN, OBJZERO, r_dayandnightTexture, R_LoadImageData(), r_radarTexture, r_xviTexture, RADAR_HEIGHT, RADAR_WIDTH, Vector2Set, Vector4Set, VectorSet, XVI_HEIGHT, XVI_WIDTH, and YAW.
Mouse button up event in the node
Reimplemented from uiLocatedNode.
Definition at line 472 of file ui_node_geoscape.cpp.
References MODE_NULL, and UI_MouseRelease().
Mouse wheel event in the node
Reimplemented from uiLocatedNode.
Definition at line 510 of file ui_node_geoscape.cpp.
|
overridevirtual |
Send mouse event when a pressed mouse button is dragged.
Reimplemented from uiLocatedNode.
Definition at line 455 of file ui_node_geoscape.cpp.
References K_MOUSE1, K_MOUSE2, K_MOUSE3, MODE_ZOOMMAP, oldMousePosX, oldMousePosY, startMouseShifting(), startX, startY, and UI_SetMouseCapture().
Return longitude and latitude of a point of the screen for 3D geoscape (globe).
| [in] | node | The current menuNode we have clicked on (3dmap or map) |
| [in] | x,y | Coordinates on the screen that were clicked on |
| [out] | pos | vec2_t was filled with longitude and latitude |
Definition at line 392 of file ui_node_geoscape.cpp.
References GLOBE_RADIUS, PITCH, RotatePointAroundVector(), UI_MAPEXTRADATACONST, v, VecToPolar(), Vector2Set, VectorNormalize(), VectorSet, and YAW.
Referenced by onLeftClick().
Return longitude and latitude of a point of the screen for 2D geoscape.
| [in] | node | The current menuNode we have clicked on (3dmap or map) |
| [in] | x,y | Coordinates on the screen that were clicked on |
| [out] | pos | vec2_t was filled with longitude and latitude |
Definition at line 372 of file ui_node_geoscape.cpp.
References UI_MAPEXTRADATACONST.
Referenced by onLeftClick().
smooth rotation of the 3D geoscape
angles and zoom so that its value goes to smoothFinalGlobeAngle Definition at line 98 of file ui_node_geoscape.cpp.
References SMOOTHACCELERATION, UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, VectorAdd, VectorCopy, VectorLength(), VectorScale, and VectorSubtract.
Referenced by draw().
smooth translation of the 2D geoscape
center so that its value goes to smoothFinal2DGeoscapeCenter zoom so that its value goes to ZOOM_LIMIT Definition at line 154 of file ui_node_geoscape.cpp.
References length, SMOOTHING_STEP_2D, UI_MAPEXTRADATA, and UI_MAPEXTRADATACONST.
Referenced by draw().
Definition at line 354 of file ui_node_geoscape.cpp.
References MODE_SHIFT2DMAP, MODE_SHIFT3DMAP, oldMousePosX, oldMousePosY, UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, and UI_SetMouseCapture().
Referenced by onStartDragging().
Zoom on the node
Definition at line 493 of file ui_node_geoscape.cpp.
References UI_MAPEXTRADATA, UI_MAPEXTRADATACONST, and zoom().
Referenced by draw(), onCapturedMouseMove(), onScroll(), uiGeoscapeNode_t_zoomin(), uiGeoscapeNode_t_zoomout(), and zoom().