summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressbar.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-03-14Moved widget drawing code into ThemeThorbjørn Lindeijer1-92/+6
This is cleaner overall since now each widget type no longer needs to keep track of its own instances and updating of the GUI alpha. It also introduces a single point from where the GUI theme support can be enhanced. Theme is no longer a singleton, though for now there is a single instance owned by the Gui singleton. Widgets adjusted to delegate their painting to the Theme: * Button * Tab * TextField * CheckBox * RadioButton * Slider * DropDown * ProgressBar * ScrollArea * ResizeGrip * PlayerBox (by subclassing ScrollArea) The Window and Popup widgets already use the theme through the Skin class. They can actually use a different skin per instance, though this feature is only used by the SpeechBubble.
2025-02-26Use ResourceRef for all resource typesThorbjørn Lindeijer1-3/+1
All ResourceManager functions that load resources now return respective ResourceRef values, which helps to make sure resources are properly cleaned up. The Sound class was cleaned up and now also allows SoundEffect resources to be unloaded. The Animation class now keeps its ImageSet loaded only as long as necessary. Previously, SimpleAnimation and ParticleEmitter would keep the ImageSet loaded indefinitely by never decreasing its reference count. Reduced duplicated animation loading code between SimpleAnimation and ParticleEmitter.
2025-01-20Made client config statically typedThorbjørn Lindeijer1-1/+1
This makes accessing the config values much faster, since it no longer needs to do a lookup nor string conversion, which means we could remove some needless copying of the values. Overall it makes it easier to find out where settings are used and it puts the defaults along with the declaration. Options with default values are no longer saved to the config file. This does not include unrecognized options, which are kept around to provide some compatibility with older clients. While most basic options have kept the same name, more complicated settings like window geometry, shortcuts, outfits, etc. now have their own XML elements. Older clients will ignore these and erase them when saving the configuration.
2024-02-13General code cleanupsThorbjørn Lindeijer1-4/+1
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-29Removed unused includes in various filesThorbjørn Lindeijer1-1/+0
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-9/+2
modernize-loop-convert modernize-deprecated-headers
2024-01-24Fixed compilation issues and use of deprecated C++ featuresThorbjørn Lindeijer1-1/+1
* Fixed compiler errors due to dynamic exception specifications * Replace std::auto_ptr with std::unique_ptr * Replace std::mem_fun with std::mem_fn * Prefix for_each with std:: (apparently not needed before) * Just use lambda instead of std::bind2nd * Removed usages of std::unary_function
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-1/+1
Reviewed-by: Yohann Ferreira
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-2/+2
Please note that I didn't turned all the getValue() call into new ones, simply because I have to have config object initiated which is not forcefully the case the branding file. Resolves: Manasource Mantis #170.
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-4/+22
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
2010-03-05Rename SkinLoader to ThemeJared Adams1-3/+3
Also merge the guialpha ConfigListener into Theme. Reviewed-by: Thorbjørn Lindeijer
2010-02-28Make the gui more themeable and distribute two themesJared Adams1-3/+1
The older gray theme and the new wood theme are available as themes. The gray theme needs some new graphics for hilights. Add a theme option for branding and add path/to/branding/data to the PhysFS search path. Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-14Reduce the number of necessary logic checks, in order to improveTametomo1-2/+2
performance in ProgressBar logic loops. Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-10Improve look and utility of the SkillDialogJared Adams1-22/+39
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-01-11Cleanup GUI classesJared Adams1-5/+5
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2009-09-03Resolved Mantis #847: Login stage Windows won't go less than the default gui ↵Bertram1-3/+13
opacity. Of course, in-game, the wanted opacity still shows up.
2009-07-25Fixed the XP bars strange behaviour.Bertram1-2/+6
By wrapping a bit more the values given at load time.
2009-07-20Committed: 0000768: Progress bars smoothly scroll when the values have ↵Bertram1-3/+2
changed from last window open. The progress bars don't smoothly update the progress when the value is set at load time now. Only the ministatus and the status window are affected by this patch, as they are the onjly ones reported as flooding the gui.
2009-05-23Reorganized status window and used non-bold font for progress bars to make ↵Philipp Sehmisch1-1/+1
more space for the numbers on the exp bar
2009-05-18Fixed progress bar crashBjørn Lindeijer1-10/+4
Sorry about that.
2009-05-08Fixed one pixel missing from progress barsBjørn Lindeijer1-34/+37
Also fixed the progress bar during connecting to reset again when full, by disabling the smooth updating there. The ProgressBar now uses gcn::Color instead of three separate color attributes.
2009-05-08Have progressbar labels ignore gui alphaJared Adams1-2/+2
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-0/+176
In an attempt to make the GUI code a little more structured, basic widgets are now put in gui/widgets. Many includes were also cleaned up.