Age | Commit message (Collapse) | Author | Files | Lines |
|
* 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.
|
|
* 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
|
|
|
|
Reviewed-by: Yohann Ferreira
|
|
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.
|
|
Also merge the guialpha ConfigListener into Theme.
Reviewed-by: Thorbjørn Lindeijer
|
|
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
|
|
|
|
|
|
Also added the update copyright tool from the Wormux Team.
( And not forgetting credit's due. :P )
|
|
Signed-off-by: Tametomo <irarice@gmail.com>
Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
|
|
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.
|
|
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.
|
|
|
|
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>
|
|
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.
|
|
the function names should no longer be around.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
a confusion on git.
|
|
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.
|
|
|
|
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.
|
|
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.
|