summaryrefslogtreecommitdiff
path: root/src/gui/widgets/resizegrip.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-04-25GUI: Allow theme to skin item slots and equipment boxesThorbjørn Lindeijer1-1/+1
* Added EquipmentBox and ItemSlot skin types. * Allowed rectangles drawn by the theme to be not filled. * Added width/height attributes to skin element since we needed a way to specify the size of the item slots and equipment boxes.
2025-03-24Expanded GUI theming capabilitiesThorbjørn Lindeijer1-4/+2
* Moved previously hardcoded values for frame size, padding and title bar height to the Skin. * Added support for rendering colored rectangles (used for scroll bar background). * Scroll bar width is now determined by its skin. * Added separate skins for horizontal and vertical scroll bars and horizontal and vertical scroll markers and added a skin for the shortcut box. * Added support for hovered state on window close button.
2025-03-24Define the GUI theme in XMLThorbjørn Lindeijer1-6/+7
Now all images used by the various UI widgets are defined in a `theme.xml`, removing hardcoded requirements on the size of images, borders and sub-images and their locations. The `colors.xml` file was merged into this new file as well. The `<img>` element defines either a plain image, or a 9-scale that is automatically rendered at the size of the widget when any of the `left`, `right`, `top` or `bottom` attributes are given. The `x`, `y`, `width` and `height` attributes determine the sub-rectangle within the image referenced by `src`. `x` and `y` default to 0 and `width` and `height` default to the imge size. The `<state>` element defines in which state its images are used by setting its `selected`, `disabled`, `hovered` or `focused` attributes to either `true` or `false`. Only the first matching state is rendered. The `Text` and `SpeechBubble` classes now use the same skin to draw the bubble, as well as using a newly introduced `BUBBLE_TEXT` color from the theme palette.
2025-03-14Moved widget drawing code into ThemeThorbjørn Lindeijer1-31/+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-2/+2
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-2/+2
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-01-26Apply C++11 fixitsThorbjørn Lindeijer1-1/+1
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-2/+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-05Rename SkinLoader to ThemeJared Adams1-2/+2
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/+3
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-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 )
2009-04-20Repaired table and listbox scrolling when using the keyboard.Ira Rice1-2/+0
Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-03-27Removed all the static initializations of mAlphaBjørn Lindeijer1-1/+1
They happened before the configuration was initialized, so that didn't make any sense. It never showed up as a problem since the value is constantly set in the draw methods anyway.
2009-03-26First batch of include cleanupBjørn Lindeijer1-6/+6
Since the relative includes are getting ugly and somewhat inconvenient, we'll switch to includes relative to the project root. We've done this for a while already with tmwserv. Another rule which we've always had but was never written down, is that each source file first includes its own header. This is common practice and ensures each header compiles without needing other stuff to be included first. Somebody using Code::Blocks might want to fix the project file by adding the 'src' directory to the list of include paths.
2009-03-26Remove redundancy, fix variable names and other code cleanupsBjørn Lindeijer1-1/+1
2009-01-30Exposed most gui elements to take alpha values. There are still a fewIra Rice1-0/+9
spots that could also be fixed up as well, but require other methods to fix them (the filled color rectangles on the progress bars, as well as the text on them as well, as an example). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-23Removed unnecessary references to The Mana World in code headersBjørn Lindeijer1-4/+4
This dates back to the old days of TMW, but the usage instructions of GPLv2 don't mention this being necessary. Since it doesn't add anything, avoid the branding in these sections.
2009-01-15Style cleanups throughout most of the code. Splitting function type fromIra Rice1-2/+1
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-25Miscellaneous TMW change commits. Missed these changes before because of Ira Rice1-2/+2
a confusion on git.
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-4/+2
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
2008-07-18Import of client treeLloyd Bryant1-1/+1
2007-09-20Merged a bunch of small changes from trunk to 0.0 and set svn:eol-style Bjørn Lindeijer1-1/+1
to native for some files that were still missing this property. This is a feeble attempt to reduce the amount of conflicts for future merges.
2007-04-15Reimplemented window resizing. It is now once again possible to resize windowsBjørn Lindeijer1-0/+65
using their borders (except for the top one, since that's the title bar for Guichan) and the resize grip in the bottom right is much easier to grab. Needs some testing.