Icon adjustments

This commit is contained in:
jacob1 2012-09-20 21:47:51 -04:00 committed by Simon Robertshaw
parent b57d956ca8
commit 5de2a4e479
3 changed files with 39 additions and 39 deletions

View File

@ -875,53 +875,53 @@ void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool inve
} }
break; break;
case IconVelocity: case IconVelocity:
drawchar(x, y, 0x98, 128, 160, 255, 255); drawchar(x, y, 0x98, 128, 160, 255, alpha);
break; break;
case IconPressure: case IconPressure:
drawchar(x, y, 0x99, 255, 212, 32, 255); drawchar(x, y, 0x99, 255, 212, 32, alpha);
break; break;
case IconPersistant: case IconPersistant:
drawchar(x, y, 0x9A, 212, 212, 212, 255); drawchar(x, y, 0x9A, 212, 212, 212, alpha);
break; break;
case IconFire: case IconFire:
drawchar(x+1, y, 0x9B, 255, 0, 0, 255); drawchar(x+1, y, 0x9B, 255, 0, 0, alpha);
drawchar(x+1, y, 0x9C, 255, 255, 64, 255); drawchar(x+1, y, 0x9C, 255, 255, 64, alpha);
break; break;
case IconBlob: case IconBlob:
drawchar(x, y, 0xBF, 55, 255, 55, 255); drawchar(x, y, 0xBF, 55, 255, 55, alpha);
break; break;
case IconHeat: case IconHeat:
drawchar(x+2, y, 0xBE, 255, 0, 0, 255); drawchar(x+2, y, 0xBE, 255, 0, 0, alpha);
drawchar(x+2, y, 0xBD, 255, 255, 255, 255); drawchar(x+2, y, 0xBD, 255, 255, 255, alpha);
break; break;
case IconBlur: case IconBlur:
drawchar(x, y, 0xC4, 100, 150, 255, 255); drawchar(x, y, 0xC4, 100, 150, 255, alpha);
break; break;
case IconGradient: case IconGradient:
drawchar(x, y, 0xD3, 255, 50, 255, 255); drawchar(x, y, 0xD3, 255, 50, 255, alpha);
break; break;
case IconLife: case IconLife:
drawchar(x, y, 0xE0, 255, 255, 255, 255); drawchar(x, y, 0xE0, 255, 255, 255, alpha);
break; break;
case IconEffect: case IconEffect:
drawchar(x, y, 0xE1, 255, 255, 160, 255); drawchar(x, y, 0xE1, 255, 255, 160, alpha);
break; break;
case IconGlow: case IconGlow:
drawchar(x, y, 0xDF, 200, 255, 255, 255); drawchar(x, y, 0xDF, 200, 255, 255, alpha);
break; break;
case IconWarp: case IconWarp:
drawchar(x, y, 0xDE, 255, 255, 255, 255); drawchar(x, y, 0xDE, 255, 255, 255, alpha);
break; break;
case IconBasic: case IconBasic:
drawchar(x, y, 0xDB, 255, 255, 200, 255); drawchar(x, y, 0xDB, 255, 255, 200, alpha);
break; break;
case IconAltAir: case IconAltAir:
drawchar(x, y, 0xD4, 255, 55, 55, 255); drawchar(x, y, 0xD4, 255, 55, 55, alpha);
drawchar(x, y, 0xD5, 55, 255, 55, 255); drawchar(x, y, 0xD5, 55, 255, 55, alpha);
break; break;
default: default:
if(invert) if(invert)
drawchar(x, y, 't', 0, 0 ,0 ,alpha); drawchar(x, y, 't', 0, 0, 0, alpha);
else else
drawchar(x, y, 't', 255, 255, 255, alpha); drawchar(x, y, 't', 255, 255, 255, alpha);
break; break;

View File

@ -86,7 +86,7 @@ void Checkbox::Draw(const Point& screenPos)
if (!Appearance.icon) if (!Appearance.icon)
g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 255); g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 255);
else else
g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon); g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon, 255);
} }
else else
{ {
@ -94,7 +94,7 @@ void Checkbox::Draw(const Point& screenPos)
if (!Appearance.icon) if (!Appearance.icon)
g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 200); g->drawtext(screenPos.X+18, screenPos.Y+4, text, 255, 255, 255, 200);
else else
g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon); g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon, 200);
} }
} }

View File

@ -75,113 +75,113 @@ RenderView::RenderView():
{ {
ui::Checkbox * tCheckbox; ui::Checkbox * tCheckbox;
tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4), ui::Point(55, 16), "Effects", "Adds Special flare effects to some elements"); tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4), ui::Point(30, 16), "Effects", "Adds Special flare effects to some elements");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconEffect); tCheckbox->SetIcon(IconEffect);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_EFFE)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_EFFE));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4+18), ui::Point(55, 16), "Fire", "Fire effect for gasses"); tCheckbox = new ui::Checkbox(ui::Point(1, YRES+4+18), ui::Point(30, 16), "Fire", "Fire effect for gasses");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconFire); tCheckbox->SetIcon(IconFire);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_FIRE)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_FIRE));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4), ui::Point(55, 16), "Glow", "Glow effect on some elements"); tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4), ui::Point(30, 16), "Glow", "Glow effect on some elements");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconGlow); tCheckbox->SetIcon(IconGlow);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_GLOW)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_GLOW));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4+18), ui::Point(55, 16), "Blur", "Blur effect for liquids"); tCheckbox = new ui::Checkbox(ui::Point(41, YRES+4+18), ui::Point(30, 16), "Blur", "Blur effect for liquids");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconBlur); tCheckbox->SetIcon(IconBlur);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLUR)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLUR));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4), ui::Point(55, 16), "Blob", "Makes everything be drawn like a blob"); tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4), ui::Point(30, 16), "Blob", "Makes everything be drawn like a blob");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconBlob); tCheckbox->SetIcon(IconBlob);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLOB)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BLOB));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4+18), ui::Point(55, 16), "Point", "Basic rendering, without this, most things will be invisible"); tCheckbox = new ui::Checkbox(ui::Point(81, YRES+4+18), ui::Point(30, 16), "Point", "Basic rendering, without this, most things will be invisible");
renderModes.push_back(tCheckbox); renderModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconBasic); tCheckbox->SetIcon(IconBasic);
tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BASC)); tCheckbox->SetActionCallback(new RenderModeAction(this, RENDER_BASC));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(136, YRES+4), ui::Point(30, 16), "Alt. Air", "Displays pressure as red and blue, and velocity as white");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconAltAir); tCheckbox->SetIcon(IconAltAir);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRC)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRC));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(136, YRES+4+18), ui::Point(70, 16), "Pressure", "Displays pressure, red is positive and blue is negative"); tCheckbox = new ui::Checkbox(ui::Point(136, YRES+4+18), ui::Point(30, 16), "Pressure", "Displays pressure, red is positive and blue is negative");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconPressure); tCheckbox->SetIcon(IconPressure);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRP)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRP));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(176, YRES+4), ui::Point(30, 16), "Velocity", "Displays velocity and positive pressure: up/down adds blue, right/left adds red, still pressure adds green");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconVelocity); tCheckbox->SetIcon(IconVelocity);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRV)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRV));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(176, YRES+4+18), ui::Point(30, 16), "Air-heat", "Displays the temperature of the air like heat display does");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconHeat); tCheckbox->SetIcon(IconHeat);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRH)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIRH));
AddComponent(tCheckbox); AddComponent(tCheckbox);
/*tCheckbox = new ui::Checkbox(ui::Point(216, YRES+4), ui::Point(70, 16), "Air", ""); /*tCheckbox = new ui::Checkbox(ui::Point(216, YRES+4), ui::Point(30, 16), "Air", "");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconAltAir); tCheckbox->SetIcon(IconAltAir);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIR)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_AIR));
AddComponent(tCheckbox);*/ AddComponent(tCheckbox);*/
tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4+18), ui::Point(70, 16), "Warp", "Gravity lensing, Newtonian Gravity bends light with this on"); tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4+18), ui::Point(30, 16), "Warp", "Gravity lensing, Newtonian Gravity bends light with this on");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconWarp); tCheckbox->SetIcon(IconWarp);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_WARP)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_WARP));
AddComponent(tCheckbox); AddComponent(tCheckbox);
#ifdef OGLR #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 tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4), ui::Point(30, 16), "Effect", "I don't know what this does...") //I would remove the whole checkbox, but then there's a large empty space
#else #else
tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4), ui::Point(70, 16), "Effect", "Does nothing"); tCheckbox = new ui::Checkbox(ui::Point(221, YRES+4), ui::Point(30, 16), "Effect", "Does nothing");
#endif #endif
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconEffect); tCheckbox->SetIcon(IconEffect);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_EFFE)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_EFFE));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4), ui::Point(70, 16), "Persistent", "Element paths persist on the screen for a while"); tCheckbox = new ui::Checkbox(ui::Point(261, YRES+4), ui::Point(30, 16), "Persistent", "Element paths persist on the screen for a while");
displayModes.push_back(tCheckbox); displayModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconPersistant); tCheckbox->SetIcon(IconPersistant);
tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_PERS)); tCheckbox->SetActionCallback(new DisplayModeAction(this, DISPLAY_PERS));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(306, YRES+4), ui::Point(30, 16), "Heat", "Displays temperatures of the elements, dark blue is coldest, pink is hotest");
colourModes.push_back(tCheckbox); colourModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconHeat); tCheckbox->SetIcon(IconHeat);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_HEAT)); tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_HEAT));
AddComponent(tCheckbox); AddComponent(tCheckbox);
tCheckbox = new ui::Checkbox(ui::Point(306, YRES+4+18), ui::Point(50, 16), "Life", "Displays the life value of elements in greyscale gradients"); tCheckbox = new ui::Checkbox(ui::Point(306, YRES+4+18), ui::Point(30, 16), "Life", "Displays the life value of elements in greyscale gradients");
colourModes.push_back(tCheckbox); colourModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconLife); tCheckbox->SetIcon(IconLife);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_LIFE)); tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_LIFE));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(346, YRES+4+18), ui::Point(30, 16), "H-Gradient", "Changes colors of elements slightly to show heat diffusing through them");
colourModes.push_back(tCheckbox); colourModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconGradient); tCheckbox->SetIcon(IconGradient);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD)); tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD));
AddComponent(tCheckbox); AddComponent(tCheckbox);
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"); tCheckbox = new ui::Checkbox(ui::Point(346, YRES+4), ui::Point(30, 16), "Basic", "No special effects at all for anything, overrides all other options and deco");
colourModes.push_back(tCheckbox); colourModes.push_back(tCheckbox);
tCheckbox->SetIcon(IconBasic); tCheckbox->SetIcon(IconBasic);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_BASC)); tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_BASC));