Age | Commit message (Collapse) | Author | Files | Lines |
|
* Use `std::unique_ptr`, so we can get rid of the custom move
constructor and destructor.
* Move and rename the `ImagePosition` enum to `WindowAlignment`, which
fits better with what this enum is actually used for.
|
|
It should be at least the minimum size. This was not the case when there
were no emotes provided by the server (as for Source of Tales
currently).
Issue manifested itself as `std::clamp` assert in debug builds, and
probably undefined but harmless behavior in release builds.
|
|
Now different windows can use different skin types. This also introduces
a new ToolWindow skin type, which is generally a window without title
bar nor close button. Customized windows are:
* Chat -> Popup skin
* MiniMap -> Popup skin
* ShortcutWindow (items and emotes) -> ToolWindow skin
Even though the MiniMap now appears as a Popup, it does have a title, so
appropriate attributes have been added to this skin type.
|
|
* 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.
|
|
The Shortcuts window could no longer be moved since adding support for
resizing windows at the top edge. Now there is again a bit of space
where the window can be grabbed.
Included some related cleanups.
|
|
* Use default member initializers
* Use range-based loops
* Don't use 'else' after 'return'
* Removed some unused includes
* Construct empty strings with std::string() instead of ""
* Clear strings with .clear() instead of assigning ""
* Check whether strings are empty with .empty() instead of comparing to ""
* Removed redundant initializations
|
|
|
|
|
|
|
|
Also added the update copyright tool from the Wormux Team.
( And not forgetting credit's due. :P )
|
|
correctly.
Patch from BinaryMind.
|
|
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
|
|
|
|
The item shortcut window is easily accessible for those who want it, but
it's a bit of a power feature so it shouldn't be shown by default.
|
|
Also cleaned up some debug log statements, fixed initialization order,
removed an unused member variable and added some documentation.
|
|
|
|
|
|
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.
|
|
Conflicts:
Many files.
|
|
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
that position. This makes it so that when resolutions are changed, the
default locations stay relative to the window's position, and not the
800x600 screen resolution.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
|
|
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
Mainly removed trailing whitespace. Also small fix in header of
recorder.cpp.
|
|
useful since buddy lists are tracked through the player relation
interface instead)
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
Mainly removed trailing whitespace. Also small fix in header of
recorder.cpp.
|
|
instances number so that it accurately reflects the number of instances,
instead of always being +1. I wasn't intending on using that variable
that way, but in case anyone does in the future, it'll at least be
accurate.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
window instances don't overlap by default. After that, it'll defer to
the user's saved window positions.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
include anything not needed by that specific widget or window. This
appears to have cleaned up system performance a bit on my current setup,
where it went from idling on 45% in game with opengl down to 30% now.
Also moved iptostring to the tostring header, as importing all of
network.h is a little overkill to use that function, and it goes along
with the basic functions that are in that header file anyways. TODO:
find out a way to get rid of warnings when a class doesn't use this
function.
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 shortcut window.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
the new shortcut windows to the reset shortcut window.
Signed-off-by: Ira Rice <irarice@gmail.com>
|
|
The window listing the smiley is ok (F11).
The window for shortcut of smiley is in progress (F12)
So far, you can use any available smiley directly (mouse interface)
and can get a reminder of the keybinding in the shortcut window.
Yet to be done (for final step 2.0):
* Transform the keybinding into the actual mapping of the shortcut seen in
F12
* Drag & Drop from F11 to F12 windows and from F12 to F12
* Code factorisation for class ShortcutContainer and derivatives Item &
Smiley (so far, most code is shared, but actually in 3 places, should
keep only specific code in leaf-class, and main code in parent)
Revision of copyright message (so far, only a cut-paste of inspiring
previous files)
* Save shortcut-smiley mapping on exit (and reload on start)
(with protection against changing smiley-list)
|