summaryrefslogtreecommitdiff
path: root/src/gui/ministatuswindow.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-04-02Use a consistent naming style for enum class valuesThorbjørn Lindeijer1-1/+1
Sometimes I've used CamelCase and sometimes SNAKE_CASE for these values. Since "enum class" values are always prefixed with the enum name, which uses CamelCase, I find it more fitting to use it for the values as well. Also fixes compilation on Windows where 'ERROR' was conflicting with a define.
2025-02-25Added tooltips to status effect iconsThorbjørn Lindeijer1-81/+105
Based on the name attributes in the status-effect XML elements. Also cleanup the code a little. Since the MiniStatusWindow now adjust its size to respect the status icons, those icons no longer have to be drawn from the Viewport.
2025-02-25Fixed status effect icon positionsThorbjørn Lindeijer1-4/+14
The status effect icons are implemented as sprites. Traditionally, since sprites were rendered on the map, they were by default centered horizontally on a tile and aligned to the bottom of the tile. The necessary offsets were part of the animation frames. This was changed in ae4aea451d6e2c44b273c963026c4fd697568f79 and 0248b2f58c783f21b7e68a20deadc0a3f942c869, which moved this offset to be applied at a later stage. At that point, client data was changed to remove this offset from the status effect icons, where it wasn't meaningful. Unfortunately, those client data changes were later reverted because the M+ fork of the client still applies the above offsets to the animation frames. Hence, to fix the status icon sprite positions, Mana client now applies the same offsets when rendering the status icons. Closes https://git.themanaworld.org/mana/mana/-/issues/95
2025-02-25Added support for option, opt1, opt2, opt3 status effect fieldsThorbjørn Lindeijer1-9/+10
Supporting these fields is necessary to correctly identify status effects sent by tmwAthena. This is a manual port of ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4, 542d2ba78d84e0fa051e0620ccab5fb3a0c711e3 and 8800940bb4b94f6dab7dcf80bf0abc3e3b09e35f from M+.
2025-02-25Some code cleanups related to status iconsThorbjørn Lindeijer1-18/+11
Fixed leaking of Sprite instances.
2025-02-21Merged AnimatedSprite into SpriteThorbjørn Lindeijer1-3/+3
With AnimatedSprite being the only implementation of the Sprite interface, there was no longer a point in separating these.
2025-02-21Fixed too fast animations for MiniStatusWindow iconsThorbjørn Lindeijer1-1/+1
AnimatedSprite works with delta time since 7de0b165f196cb0c1f983b6d2a. Adjusted some parameter names for clarity. Closes https://git.themanaworld.org/mana/mana/-/issues/94
2025-01-20Made client config statically typedThorbjørn Lindeijer1-1/+3
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-10-08Added convenient and efficient Timer classThorbjørn Lindeijer1-3/+2
The Timer is efficient because it does not depend on incrementing a counter to keep track of time, nor does it call SDL_GetTicks every time its state is checked (this happens once per frame instead). Along with global functions Time::absoluteTimeMs() and Time::deltaTimeMs(), this replaces previous globals tick_time, cur_time and get_elapsed_time(). For now, there is still a fixed 100 times per second logic call rate, but the new Time::deltaTimeMs() function should allow getting rid of this.
2024-04-02Fixed padding on mini-status windowThorbjørn Lindeijer1-0/+2
Broke in 474442f1a49d29d85de769c4fbb3aa8636877b49 due to changing the default padding on the Popup class.
2024-03-02Changed server type to "enum class"Thorbjørn Lindeijer1-1/+1
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-7/+7
modernize-loop-convert modernize-deprecated-headers
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-1/+1
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2013-04-13Removed unused IntMap typedefThorbjørn Lindeijer1-2/+0
2012-02-09Setting y-offset back to 3 for status effect iconsStefan Dombrowski1-1/+1
This is broken with current TMW client-data, so it has to be fixed there.
2012-02-09Show status effect icons again and position adjustStefan Dombrowski1-2/+3
The icon for #betsanc is still shown too high. Reviewed-by: Ablu, Bertram
2012-02-07Fixed color updates of magic barErik Schilling1-0/+10
Resolves: Mana-Mantis #457. Reviewed-by: Bertram.
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer1-0/+261
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira