Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CProgressBar.cpp
Show All 19 Lines | |||||
#include "GUI.h" | #include "GUI.h" | ||||
#include "CProgressBar.h" | #include "CProgressBar.h" | ||||
#include "lib/ogl.h" | #include "lib/ogl.h" | ||||
CProgressBar::CProgressBar(CGUI* pGUI) | CProgressBar::CProgressBar(CGUI* pGUI) | ||||
: IGUIObject(pGUI) | : IGUIObject(pGUI) | ||||
{ | { | ||||
} | |||||
CProgressBar::~CProgressBar() | |||||
{ | |||||
} | |||||
void CProgressBar::AddSettings() | |||||
{ | |||||
AddSetting(GUIST_CGUISpriteInstance, "sprite_background"); | AddSetting(GUIST_CGUISpriteInstance, "sprite_background"); | ||||
AddSetting(GUIST_CGUISpriteInstance, "sprite_bar"); | AddSetting(GUIST_CGUISpriteInstance, "sprite_bar"); | ||||
AddSetting(GUIST_float, "caption"); // aka value from 0 to 100 | AddSetting(GUIST_float, "caption"); // aka value from 0 to 100 | ||||
AddSetting(GUIST_CStrW, "tooltip"); | AddSetting(GUIST_CStrW, "tooltip"); | ||||
AddSetting(GUIST_CStr, "tooltip_style"); | AddSetting(GUIST_CStr, "tooltip_style"); | ||||
} | |||||
CProgressBar::~CProgressBar() | IGUIObject::AddSettings(); | ||||
{ | |||||
} | } | ||||
void CProgressBar::HandleMessage(SGUIMessage& Message) | void CProgressBar::HandleMessage(SGUIMessage& Message) | ||||
{ | { | ||||
// Important | |||||
IGUIObject::HandleMessage(Message); | |||||
switch (Message.type) | switch (Message.type) | ||||
{ | { | ||||
case GUIM_SETTINGS_UPDATED: | case GUIM_SETTINGS_UPDATED: | ||||
// Update scroll-bar | // Update scroll-bar | ||||
// TODO Gee: (2004-09-01) Is this really updated each time it should? | // TODO Gee: (2004-09-01) Is this really updated each time it should? | ||||
if (Message.value == CStr("caption")) | if (Message.value == CStr("caption")) | ||||
{ | { | ||||
float value; | float value; | ||||
Show All 35 Lines |
Wildfire Games · Phabricator