summaryrefslogtreecommitdiff
path: root/src/render/RenderView.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-09-21 01:37:36 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-09-25 19:09:43 (GMT)
commitb57d956ca84061974efe1be882b08b77633f26d2 (patch)
treef5c1cb2c83b333dec3bc1aeff04171e6190e8b08 /src/render/RenderView.cpp
parent187a5189d597786e51a89221b16393e4ccc37256 (diff)
downloadpowder-b57d956ca84061974efe1be882b08b77633f26d2.zip
powder-b57d956ca84061974efe1be882b08b77633f26d2.tar.gz
Icons and tooltips for everything in renderview. (Empty space not filled yet)
Diffstat (limited to 'src/render/RenderView.cpp')
-rw-r--r--src/render/RenderView.cpp72
1 files changed, 47 insertions, 25 deletions
diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp
index d29b426..087b20b 100644
--- a/src/render/RenderView.cpp
+++ b/src/render/RenderView.cpp
@@ -75,93 +75,115 @@ RenderView::RenderView():
{
ui::Checkbox * tCheckbox;
- tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4), ui::Point(55, 16), "Effects", "");
+ tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4), ui::Point(55, 16), "Effects", "Adds Special flare effects to some elements");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconEffect);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_EFFE));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4+18), ui::Point(55, 16), "Fire", "");
+ tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4+18), ui::Point(55, 16), "Fire", "Fire effect for gasses");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconFire);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_FIRE));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(61, YRES+4), ui::Point(55, 16), "Glow", "");
+ tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4), ui::Point(55, 16), "Glow", "Glow effect on some elements");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconGlow);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_GLOW));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(61, YRES+4+18), ui::Point(55, 16), "Blur", "");
+ tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4+18), ui::Point(55, 16), "Blur", "Blur effect for liquids");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconBlur);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLUR));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(121, YRES+4), ui::Point(55, 16), "Blob", "");
+ tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4), ui::Point(55, 16), "Blob", "Makes everything be drawn like a blob");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconBlob);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLOB));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(121, YRES+4+18), ui::Point(55, 16), "Point", "");
+ tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4+18), ui::Point(55, 16), "Point", "Basic rendering, without this, most things will be invisible");
renderModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconBasic);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BASC));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(186, YRES+4), ui::Point(70, 16), "Alt. Air", "");
+ tCheckbox = new ui::Checkbox(ui::Point(136, YRES+4), ui::Point(70, 16), "Alt. Air", "Displays pressure as red and blue, and velocity as white");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconAltAir);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRC));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(186, YRES+4+18), ui::Point(70, 16), "Pressure", "");
+ tCheckbox = new ui::Checkbox(ui::Point(136, YRES+4+18), ui::Point(70, 16), "Pressure", "Displays pressure, red is positive and blue is negative");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconPressure);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRP));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4), ui::Point(70, 16), "Velocity", "");
+ tCheckbox = new ui::Checkbox(ui::Point(176, YRES+4), ui::Point(70, 16), "Velocity", "Displays velocity and positive pressure: up/down adds blue, right/left adds red, still pressure adds green");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconVelocity);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRV));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4+18), ui::Point(70, 16), "Air-heat", "");
+ tCheckbox = new ui::Checkbox(ui::Point(176, YRES+4+18), ui::Point(70, 16), "Air-heat", "Displays the temperature of the air like heat display does");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconHeat);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRH));
AddComponent(tCheckbox);
- /*tCheckbox = new ui::Checkbox(ui::Point(336, YRES+4), ui::Point(70, 16), "Air", "");
+ /*tCheckbox = new ui::Checkbox(ui::Point(216, YRES+4), ui::Point(70, 16), "Air", "");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconAltAir);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIR));
AddComponent(tCheckbox);*/
- tCheckbox = new ui::Checkbox(ui::Point(336, YRES+4+18), ui::Point(70, 16), "Warp", "");
+ tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4+18), ui::Point(70, 16), "Warp", "Gravity lensing, Newtonian Gravity bends light with this on");
displayModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconWarp);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_WARP));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(411, YRES+4), ui::Point(70, 16), "Persistent", "");
+#ifdef OGLR
+ tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4), ui::Point(70, 16), "Effect", "I don't know what this does...") //I would remove the whole checkbox, but then there's a large empty space
+#else
+ tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4), ui::Point(70, 16), "Effect", "Does nothing");
+#endif
displayModes.push_back(tCheckbox);
- tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_PERS));
+ tCheckbox->SetIcon(IconEffect);
+ tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_EFFE));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(336, YRES+4), ui::Point(70, 16), "Effect", "");
+ tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4), ui::Point(70, 16), "Persistent", "Element paths persist on the screen for a while");
displayModes.push_back(tCheckbox);
- tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_EFFE));
+ tCheckbox->SetIcon(IconPersistant);
+ tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_PERS));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(486, YRES+4), ui::Point(50, 16), "Heat", "");
+ tCheckbox = new ui::Checkbox(ui::Point(306, YRES+4), ui::Point(50, 16), "Heat", "Displays temperatures of the elements, dark blue is coldest, pink is hotest");
colourModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconHeat);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_HEAT));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(486, YRES+4+18), ui::Point(50, 16), "Life", "");
+ tCheckbox = new ui::Checkbox(ui::Point(306, YRES+4+18), ui::Point(50, 16), "Life", "Displays the life value of elements in greyscale gradients");
colourModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconLife);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_LIFE));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(536, YRES+4+18), ui::Point(50, 16), "H-Gradient", "");
+ tCheckbox = new ui::Checkbox(ui::Point(346, YRES+4+18), ui::Point(50, 16), "H-Gradient", "Changes colors of elements slightly to show heat diffusing through them");
colourModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconGradient);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD));
AddComponent(tCheckbox);
- tCheckbox = new ui::Checkbox(ui::Point(536, YRES+4), ui::Point(50, 16), "Basic", "");
+ tCheckbox = new ui::Checkbox(ui::Point(346, YRES+4), ui::Point(50, 16), "Basic", "No special effects at all for anything, overrides all other options and deco");
colourModes.push_back(tCheckbox);
+ tCheckbox->SetIcon(IconBasic);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_BASC));
AddComponent(tCheckbox);
}
@@ -246,13 +268,13 @@ void RenderView::OnDraw()
ren->RenderEnd();
}
g->draw_line(0, YRES, XRES-1, YRES, 200, 200, 200, 255);
- g->draw_line(180, YRES, 180, YRES+MENUSIZE, 200, 200, 200, 255);
- g->draw_line(330, YRES, 330, YRES+MENUSIZE, 200, 200, 200, 255);
- g->draw_line(480, YRES, 480, YRES+MENUSIZE, 200, 200, 200, 255);
+ g->draw_line(130, YRES, 130, YRES+MENUSIZE, 200, 200, 200, 255);
+ g->draw_line(215, YRES, 215, YRES+MENUSIZE, 200, 200, 200, 255);
+ g->draw_line(300, YRES, 300, YRES+MENUSIZE, 200, 200, 200, 255);
g->draw_line(XRES, 0, XRES, YRES+MENUSIZE, 255, 255, 255, 255);
if(toolTipPresence && toolTip.length())
{
- g->drawtext(6, Size.Y-MENUSIZE-10, (char*)toolTip.c_str(), 255, 255, 255, toolTipPresence>51?255:toolTipPresence*5);
+ g->drawtext(6, Size.Y-MENUSIZE-12, (char*)toolTip.c_str(), 255, 255, 255, toolTipPresence>51?255:toolTipPresence*5);
}
}
@@ -269,7 +291,7 @@ void RenderView::OnTick(float dt)
void RenderView::ToolTip(ui::Component * sender, ui::Point mousePosition, std::string toolTip)
{
this->toolTip = toolTip;
- toolTipPresence = 160;
+ toolTipPresence = 500;
}
RenderView::~RenderView() {