added hotkey of ? as a way to toggle on/off the debug UI display
This commit is contained in:
parent
1ae2a9ae10
commit
83dbaf7886
|
@ -1011,14 +1011,13 @@ void Game::render2d(){
|
|||
}
|
||||
}
|
||||
|
||||
if(config.getBool("DebugMode")){
|
||||
renderer.renderText(
|
||||
str, coreData.getMenuFontNormal(),
|
||||
Vec3f(1.0f), 10, 500, false);
|
||||
if(config.getBool("DebugMode") && gui.getShowDebugUI() == true) {
|
||||
renderer.renderText(str, coreData.getMenuFontNormal(),
|
||||
Vec3f(1.0f), 10, 500, false);
|
||||
}
|
||||
|
||||
//network status
|
||||
if(renderNetworkStatus){
|
||||
if(renderNetworkStatus) {
|
||||
renderer.renderText(
|
||||
NetworkManager::getInstance().getGameNetworkInterface()->getNetworkStatus(),
|
||||
coreData.getMenuFontNormal(),
|
||||
|
@ -1026,7 +1025,7 @@ void Game::render2d(){
|
|||
}
|
||||
|
||||
//resource info
|
||||
if(!config.getBool("PhotoMode")){
|
||||
if(!config.getBool("PhotoMode")) {
|
||||
renderer.renderResourceStatus();
|
||||
renderer.renderConsole(&console,showFullConsole);
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ void Gui::init(Game *game){
|
|||
this->console= game->getConsole();
|
||||
this->world= game->getWorld();
|
||||
selection.init(this, world->getThisFactionIndex());
|
||||
this->showDebugUI = false;
|
||||
}
|
||||
|
||||
void Gui::end(){
|
||||
|
@ -338,6 +339,9 @@ void Gui::hotKey(char key){
|
|||
else if(key=='B'){
|
||||
selectInterestingUnit(iutBuiltBuilding);
|
||||
}
|
||||
else if(key=='?') {
|
||||
this->showDebugUI = !this->showDebugUI;
|
||||
}
|
||||
else if(key=='R'){
|
||||
// Here the user triggers a unit rotation while placing a unit
|
||||
if(allowRotateUnits == true && isPlacingBuilding()) {
|
||||
|
|
|
@ -133,6 +133,8 @@ private:
|
|||
CardinalDir selectedBuildingFacing;
|
||||
bool allowRotateUnits;
|
||||
|
||||
bool showDebugUI;
|
||||
|
||||
public:
|
||||
Gui();
|
||||
void init(Game *game);
|
||||
|
@ -177,6 +179,8 @@ public:
|
|||
void switchToNextDisplayColor();
|
||||
void onSelectionChanged();
|
||||
|
||||
bool getShowDebugUI() { return showDebugUI; }
|
||||
|
||||
private:
|
||||
|
||||
//orders
|
||||
|
|
Loading…
Reference in New Issue
Block a user