Changeset View
Changeset View
Standalone View
Standalone View
source/gui/MiniMap.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
CMiniMap::CMiniMap(CGUI* pGUI) : | CMiniMap::CMiniMap(CGUI* pGUI) : | ||||
IGUIObject(pGUI), | IGUIObject(pGUI), | ||||
m_TerrainTexture(0), m_TerrainData(0), m_MapSize(0), m_Terrain(0), m_TerrainDirty(true), m_MapScale(1.f), | m_TerrainTexture(0), m_TerrainData(0), m_MapSize(0), m_Terrain(0), m_TerrainDirty(true), m_MapScale(1.f), | ||||
m_EntitiesDrawn(0), m_IndexArray(GL_STATIC_DRAW), m_VertexArray(GL_DYNAMIC_DRAW), | m_EntitiesDrawn(0), m_IndexArray(GL_STATIC_DRAW), m_VertexArray(GL_DYNAMIC_DRAW), | ||||
m_NextBlinkTime(0.0), m_PingDuration(25.0), m_BlinkState(false), m_WaterHeight(0.0) | m_NextBlinkTime(0.0), m_PingDuration(25.0), m_BlinkState(false), m_WaterHeight(0.0) | ||||
{ | { | ||||
AddSetting(GUIST_CStrW, "tooltip"); | |||||
AddSetting(GUIST_CStr, "tooltip_style"); | |||||
m_Clicking = false; | m_Clicking = false; | ||||
m_MouseHovering = false; | m_MouseHovering = false; | ||||
// Register Relax NG validator | // Register Relax NG validator | ||||
CXeromyces::AddValidator(g_VFS, "pathfinder", "simulation/data/pathfinder.rng"); | CXeromyces::AddValidator(g_VFS, "pathfinder", "simulation/data/pathfinder.rng"); | ||||
// Get the maximum height for unit passage in water. | // Get the maximum height for unit passage in water. | ||||
CParamNode externalParamNode; | CParamNode externalParamNode; | ||||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | CMiniMap::CMiniMap(CGUI* pGUI) : | ||||
m_HalfBlinkDuration = blinkDuration/2; | m_HalfBlinkDuration = blinkDuration/2; | ||||
} | } | ||||
CMiniMap::~CMiniMap() | CMiniMap::~CMiniMap() | ||||
{ | { | ||||
Destroy(); | Destroy(); | ||||
} | } | ||||
void CMiniMap::AddSettings() | |||||
{ | |||||
AddSetting(GUIST_CStrW, "tooltip"); | |||||
AddSetting(GUIST_CStr, "tooltip_style"); | |||||
IGUIObject::AddSettings(); | |||||
} | |||||
void CMiniMap::HandleMessage(SGUIMessage& Message) | void CMiniMap::HandleMessage(SGUIMessage& Message) | ||||
{ | { | ||||
switch (Message.type) | switch (Message.type) | ||||
{ | { | ||||
case GUIM_MOUSE_PRESS_LEFT: | case GUIM_MOUSE_PRESS_LEFT: | ||||
if (m_MouseHovering) | if (m_MouseHovering) | ||||
{ | { | ||||
SetCameraPos(); | SetCameraPos(); | ||||
▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator