Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/ps/CConsole.cpp
Show All 39 Lines | |||||
#include "ps/ConfigDB.h" | #include "ps/ConfigDB.h" | ||||
#include "ps/CStrInternStatic.h" | #include "ps/CStrInternStatic.h" | ||||
#include "ps/Filesystem.h" | #include "ps/Filesystem.h" | ||||
#include "ps/GameSetup/Config.h" | #include "ps/GameSetup/Config.h" | ||||
#include "ps/Globals.h" | #include "ps/Globals.h" | ||||
#include "ps/Hotkey.h" | #include "ps/Hotkey.h" | ||||
#include "ps/Profile.h" | #include "ps/Profile.h" | ||||
#include "ps/Pyrogenesis.h" | #include "ps/Pyrogenesis.h" | ||||
#include "ps/VideoMode.h" | |||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
#include "scriptinterface/JSON.h" | #include "scriptinterface/JSON.h" | ||||
#include <vector> | #include <vector> | ||||
namespace | namespace | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | void CConsole::Init() | ||||
CFG_GET_VAL("gui.cursorblinkrate", m_cursorBlinkRate); | CFG_GET_VAL("gui.cursorblinkrate", m_cursorBlinkRate); | ||||
} | } | ||||
void CConsole::UpdateScreenSize(int w, int h) | void CConsole::UpdateScreenSize(int w, int h) | ||||
{ | { | ||||
m_fX = 0; | m_fX = 0; | ||||
m_fY = 0; | m_fY = 0; | ||||
float height = h * 0.6f; | float height = h * 0.6f; | ||||
m_fWidth = w / g_GuiScale; | m_fWidth = w / g_VideoMode.GetScale(); | ||||
m_fHeight = height / g_GuiScale; | m_fHeight = height / g_VideoMode.GetScale(); | ||||
} | } | ||||
void CConsole::ToggleVisible() | void CConsole::ToggleVisible() | ||||
{ | { | ||||
m_bToggle = true; | m_bToggle = true; | ||||
m_bVisible = !m_bVisible; | m_bVisible = !m_bVisible; | ||||
// TODO: this should be based on input focus, not visibility | // TODO: this should be based on input focus, not visibility | ||||
▲ Show 20 Lines • Show All 587 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator