Permalink
Browse files

Added ambient heat to the HUD

  • Loading branch information...
jbot-42 authored and jacob1 committed Sep 20, 2015
1 parent 9b95552 commit 78c700a62bc95ae45c0d64a4d57143b362068e5c
Showing with 16 additions and 7 deletions.
  1. +5 −5 data/IntroText.h
  2. +5 −0 src/gui/game/GameController.cpp
  3. +1 −0 src/gui/game/GameController.h
  4. +5 −2 src/gui/game/GameView.cpp
@@ -12,11 +12,11 @@ static const char *introTextData =
"Use the mouse scroll wheel, or '[' and ']', to change the tool size for particles.\n"
"Middle click or Alt+Click to \"sample\" the particles.\n"
"Ctrl+Z will act as Undo.\n"
"\n\boUse 'Z' for a zoom tool. Click to make the drawable zoom window stay around. Use the wheel to change the zoom strength\n"
"The spacebar can be used to pause physics.\n"
"Use 'S' to save parts of the window as 'stamps'.\n"
"'L' will load the most recent stamp, 'K' shows a library of stamps you saved.\n"
"'P' will take a screenshot and save it into the current directory.\n"
"\n\boUse 'Z' for a zoom tool. Click to make the drawable zoom window stay around. Use the wheel to change the zoom strength.\n"
"The spacebar can be used to pause physics. Use 'F' to step ahead by one frame.\n"
"Use 'S' to save parts of the window as 'stamps'. 'L' loads the most recent stamp, 'K' shows a library of stamps you saved.\n"
"Use 'P' to take a screenshot and save it into the current directory.\n"
"Use 'H' to toggle the HUD. Use 'D' to toggle debug mode in the HUD.\n"
"\n"
"Contributors: \bgStanislaw K Skowronek (Designed the original Powder Toy),\n"
"\bgSimon Robertshaw, Skresanov Savely, cracker64, Catelite, Bryan Hoyle, Nathan Cousins, jacksonmj,\n"
@@ -866,6 +866,11 @@ void GameController::ToggleAHeat()
gameModel->SetAHeatEnable(!gameModel->GetAHeatEnable());
}

bool GameController::GetAHeatEnable()
{
return gameModel->GetAHeatEnable();
}

void GameController::ToggleNewtonianGravity()
{
if (gameModel->GetSimulation()->grav->ngrav_enable)
@@ -153,6 +153,7 @@ class GameController: public ClientListener
void SwitchGravity();
void SwitchAir();
void ToggleAHeat();
bool GetAHeatEnable();
void ToggleNewtonianGravity();

bool LoadClipboard();
@@ -2325,13 +2325,16 @@ void GameView::OnDraw()
sampleInfo.str(std::string());

if(sample.particle.type)
{
sampleInfo << "#" << sample.ParticleID << ", ";
}

sampleInfo << "X:" << sample.PositionX << " Y:" << sample.PositionY;

if (sample.Gravity)
sampleInfo << " GX: " << sample.GravityVelocityX << " GY: " << sample.GravityVelocityY;

if (c->GetAHeatEnable())
sampleInfo << ", AHeat: " << std::fixed << sample.AirTemperature -273.15f << " C";

textWidth = Graphics::textwidth((char*)sampleInfo.str().c_str());
g->fillrect(XRES-20-textWidth, 27, textWidth+8, 14, 0, 0, 0, alpha*0.5f);
g->drawtext(XRES-16-textWidth, 30, (const char*)sampleInfo.str().c_str(), 255, 255, 255, alpha*0.75f);

0 comments on commit 78c700a

Please sign in to comment.