____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <vector>
Go to the source code of this file.
Classes | |
| class | CCursor |
| < Private type which specifies the cursor-type More... | |
| class | CursorConfig |
Enumerations | |
| enum | CursorStates { CursorStatePoint, CursorStateSelect, CursorStateRectangle, CursorStatePieMenu } |
Functions | |
| void | LoadCursors () |
| < Load all cursors | |
| CCursor * | CursorByIdent (const std::string &ident) |
| Draw any cursor. | |
| void | DrawCursor (void) |
| Hide the cursor. | |
| void | HideCursor (void) |
| Animate the cursor. | |
| void | CursorAnimate (unsigned ticks) |
| Initialize the cursor module. | |
| void | InitVideoCursors (void) |
| Cleanup the cursor module. | |
| void | CleanCursors (void) |
Variables | |
| std::vector< CCursor > | AllCursors |
| cursor-types description | |
| CursorStates | CursorState |
| current cursor state (point,...) | |
| int | CursorAction |
| action for selection | |
| int | CursorValue |
| value for action (spell type f.e.) | |
| CUnitType * | CursorBuilding |
| building cursor | |
| CCursor * | GameCursor |
| cursor-type | |
| int | CursorX |
| cursor position on screen X | |
| int | CursorY |
| cursor position on screen Y | |
| int | CursorStartX |
| rectangle started on screen X | |
| int | CursorStartY |
| rectangle started on screen Y | |
| int | CursorStartScrMapX |
| the same in screen map coordinate system | |
| int | CursorStartScrMapY |
| the same in screen map coordinate system | |
Definition in file cursor.h.
| enum CursorStates |
| void CleanCursors | ( | void | ) |
Cleanup cursor module
Definition at line 371 of file cursor.cpp.
References AllCursors, CGraphic::Free(), NoUnitP, and UnitUnderCursor.
Referenced by CleanModules().
| void CursorAnimate | ( | unsigned | ticks | ) |
Initialize the cursor module.
Animate the cursor.
| ticks | Current tick |
Definition at line 345 of file cursor.cpp.
References CCursor::FrameRate, CCursor::G, CGraphic::NumFrames, and CCursor::SpriteFrame.
Referenced by WaitEventsOneFrame().
| CCursor* CursorByIdent | ( | const std::string & | ident | ) |
Draw any cursor.
Find the cursor of this identifier.
| ident | Identifier for the cursor (from config files). |
Definition at line 122 of file cursor.cpp.
References _C_, AllCursors, and DebugPrint.
Referenced by CclSetGameCursor(), and CursorConfig::Load().
| void DrawCursor | ( | void | ) |
Hide the cursor.
Draw the cursor.
Definition at line 271 of file cursor.cpp.
References CursorOn, CursorOnMap, CursorStartScrMapX, CursorStartScrMapY, CursorStartX, CursorStartY, CursorState, CursorStateRectangle, CursorX, CursorY, DrawBuildingCursor(), CGraphic::DrawFrameClip(), DrawVisibleRectangleCursor(), Editor, CCursor::G, GameRunning, CGraphic::getHeight(), CGraphic::getWidth(), HiddenSurface, CCursor::HotX, CCursor::HotY, CViewport::MapX, CViewport::MapY, CUserInterface::MouseViewport, CViewport::OffsetX, CViewport::OffsetY, PatchEditorRunning, CEditor::Running, CCursor::SpriteFrame, TheScreen, TileSizeX, TileSizeY, UI, UseOpenGL, CViewport::X, and CViewport::Y.
Referenced by EditorUpdateDisplay(), PatchEditorUpdateDisplay(), and UpdateDisplay().
| void HideCursor | ( | void | ) |
Animate the cursor.
Hide the cursor
Definition at line 327 of file cursor.cpp.
References CursorX, CursorY, Editor, GameRunning, HiddenSurface, CCursor::HotX, CCursor::HotY, PatchEditorRunning, CEditor::Running, TheScreen, and UseOpenGL.
Referenced by RealizeVideoMemory().
| void InitVideoCursors | ( | void | ) |
Cleanup the cursor module.
Setup the cursor part.
Definition at line 364 of file cursor.cpp.
Referenced by InitModules(), and PreMenuSetup().
| void LoadCursors | ( | ) |
< Load all cursors
Cursor by identifier
Load all cursor sprites.
Definition at line 100 of file cursor.cpp.
References AllCursors, and ShowLoadProgress().
Referenced by CreateGame(), LoadModules(), and PreMenuSetup().
| std::vector<CCursor> AllCursors |
cursor-types description
Define cursor-types.
Definition at line 62 of file cursor.cpp.
Referenced by CclDefineCursor(), CleanCursors(), CursorByIdent(), and LoadCursors().
| int CursorAction |
action for selection
Definition at line 65 of file cursor.cpp.
Referenced by CButtonPanel::DoClicked(), and SendCommand().
building cursor
Definition at line 85 of file cursor.cpp.
Referenced by CancelBuildingMode(), CleanGame(), CButtonPanel::DoClicked(), DrawMapCursor(), DrawUnitSelection(), EditorCallbackButtonDown(), EditorCallbackMouse(), SelectionChanged(), and UIHandleButtonDown().
the same in screen map coordinate system
Definition at line 80 of file cursor.cpp.
Referenced by DrawCursor(), UIHandleButtonDown(), and UIHandleButtonUp().
the same in screen map coordinate system
Definition at line 81 of file cursor.cpp.
Referenced by DrawCursor(), UIHandleButtonDown(), and UIHandleButtonUp().
| int CursorStartX |
rectangle started on screen X
Definition at line 72 of file cursor.cpp.
Referenced by DrawCursor(), DrawPieMenu(), EditorCallbackButtonDown(), GetPieUnderCursor(), HandlePieMenuMouseSelection(), MouseScrollMap(), RestrictCursorToMinimap(), RestrictCursorToViewport(), UIHandleButtonDown(), UIHandleButtonUp(), and UIHandleMouseMove().
| int CursorStartY |
rectangle started on screen Y
Definition at line 73 of file cursor.cpp.
Referenced by DrawCursor(), DrawPieMenu(), EditorCallbackButtonDown(), GetPieUnderCursor(), HandlePieMenuMouseSelection(), MouseScrollMap(), RestrictCursorToMinimap(), RestrictCursorToViewport(), UIHandleButtonDown(), UIHandleButtonUp(), and UIHandleMouseMove().
current cursor state (point,...)
Definition at line 64 of file cursor.cpp.
Referenced by CButtonPanel::DoClicked(), DrawCursor(), DrawPieMenu(), HandlePieMenuMouseSelection(), MenuLoop(), MenuScreen::run(), SelectionChanged(), UIHandleButtonDown(), UIHandleButtonUp(), UIHandleMouseMove(), UISelectStateButtonDown(), and UpdateDisplay().
| int CursorValue |
value for action (spell type f.e.)
Definition at line 66 of file cursor.cpp.
Referenced by CButtonPanel::DoClicked(), and SendSpellCast().
| int CursorX |
cursor position on screen X
Definition at line 69 of file cursor.cpp.
Referenced by DoScrollArea(), DrawBuildingCursor(), DrawCursor(), DrawMapCursor(), EditorCallbackButtonDown(), EditorCallbackKeyDown(), EditorCallbackMouse(), FinishViewportModeConfiguration(), GetPieUnderCursor(), HandleCursorMove(), HandleMouseExit(), HandlePieMenuMouseSelection(), HideCursor(), RestrictCursorToMinimap(), RestrictCursorToViewport(), MenuScreen::stop(), tolua_get_CursorX(), tolua_set_CursorX(), UIHandleButtonDown(), UIHandleButtonUp(), UIHandleMouseMove(), and UISelectStateButtonDown().
| int CursorY |
cursor position on screen Y
Definition at line 70 of file cursor.cpp.
Referenced by DoScrollArea(), DrawBuildingCursor(), DrawCursor(), DrawMapCursor(), EditorCallbackButtonDown(), EditorCallbackKeyDown(), EditorCallbackMouse(), FinishViewportModeConfiguration(), GetPieUnderCursor(), HandleCursorMove(), HandleMouseExit(), HandlePieMenuMouseSelection(), HideCursor(), RestrictCursorToMinimap(), RestrictCursorToViewport(), MenuScreen::stop(), tolua_get_CursorY(), tolua_set_CursorY(), UIHandleButtonDown(), UIHandleButtonUp(), UIHandleMouseMove(), and UISelectStateButtonDown().
cursor-type
Definition at line 89 of file cursor.cpp.
Referenced by CclSetGameCursor(), CButtonPanel::DoClicked(), EditorCallbackButtonDown(), EditorCallbackButtonUp(), EditorCallbackMouse(), EditorMainLoop(), GameMainLoop(), HandleMouseExit(), HandleMouseScrollArea(), MenuLoop(), PatchEditorCallbackMouse(), MenuScreen::run(), SelectionChanged(), UIHandleButtonDown(), UIHandleButtonUp(), UIHandleMouseMove(), and UISelectStateButtonDown().
1.5.6