Age | Commit message (Collapse) | Author | Files | Lines |
|
input field.
|
|
Seems this color just wasn't copied over correctly due to being on a
different palette originally.
Also made Tab::draw use the correct outline color.
Addresses part of #98.
|
|
Since there was already specific support for theming different progress
bars with a custom color gradient, it was relatively straight-forward to
extend this to support custom text formats.
Thanks to @Meway for having an initial go at this feature!
Closes #111
|
|
By using SDL logging, we can rely on SDL to filter the log messages by
their priority before they get sent to our custom output function. For
example, we now no longer get entries for created and destroyed Window
instances by default, since these have only "debug" priority whereas the
default priority for the "app" category is "info".
We can also get log messages raised by SDL itself in our log now. Log
levels can be controlled per category through the "SDL_LOGGING"
environment variable.
Many existing log messages have been assigned a category based on their
existing prefix.
|
|
On Windows, the SDL event loop would get blocked during move/resize,
which made the game stop updating. Since version 2.30, SDL will send its
SDL_WINDOWEVENT_EXPOSED event on an internal timer during window
move/resize so the application can keep redrawing.
Since no window size changed events can be received either, the size of
the window and the renderer is now updated at the start of each frame.
On macOS the SDL event loop was similarly blocked during resize.
The event watcher is only used on Windows and macOS because on X11 the
processing of all the queued up expose events can cause a delayed response to
resizing. Besides, the issues fixed by this watcher don't exist on X11 and
Wayland.
|
|
As used to be available in the old manual NSIS file.
|
|
A compatible definition of MAKEWORD may already get pulled in from the
Windows include minwindef.h.
|
|
|
|
Otherwise, at least on X11, the window is (visibly) re-created once the
SDL renderer is created. Also the window icon can be seen changing on
startup. Showing the window only after all related setup has been
completed avoids this.
On X11 this appears to have the added benefit of putting a "windowed
fullscreen" window on the active screen (in terms of where the mouse is)
rather than always using the primary screen.
On Windows, showing the window only after the initial paint avoids the
window initially appearing with its contents entirely black.
The window is still immediately shown in the following cases:
* In exclusive fullscreen mode, because on Windows this caused the
initial show of a fullscreen window to take much longer and on X11 it
could cause the resolution of the primary screen to be changed while
maximizing the Mana window on the active screen.
* In "windowed fullscreen" mode when the legacy OpenGL renderer is used,
where it was causing an additional flicker on Windows.
|
|
|
|
This window gives an overview over completed and currently active
quests. A persistent checkbox toggles whether completed quests are
shown. Item links are supported in quest texts.
New window icon by meway. Completed quest icon for Mana theme copied
from ManaPlus.
The Quests window has no shortcut for now.
|
|
The `TmwAthena::PlayerHandler` now handles the quest variables and
applies the active quest effects to NPCs. They are updated when
variables change or the map changes.
|
|
- Introduce QuestDB with quest/effect structures and XML parsing
- Register questdb in CMake and settings manager
- Add fromString overload for std::vector<int> parsing
|
|
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.
|
|
This avoids some duplicated code between `Client` and `Game` and reduces
code indentation. Now only the `Client` calls `SDL_PollEvent` and
handles `SDL_WINDOWEVENT_SIZE_CHANGED`.
This also fixes the Keyboard setup tab to allow assigning keys before
starting the game.
|
|
* When hovering an empty box in the shortcut window, the tooltip of a
previously hovered non-empty box would stay visible.
* When hovering to the right of a row of inventory items, the tooltip
for the left-most item on the next row would be displayed.
Also added some padding to shift the text and item icon a little in the
shortcut window when using the Jewelry theme.
|
|
Guichan 0.8.3 was released and can now be installed through Homebrew,
we don't need to rely on the Guichan submodule on macOS anymore.
|
|
Seems libcurl4 was renamed in the transition to 64-bit time_t (for
Ubuntu 24.04).
|
|
|
|
When adding support for SMSG_NPC_COMMAND in d5ebad4e74da011777f9ba1a13f,
I mistakenly assumed the "close dialog" (5) command should just close
the NPC dialog. However, the client is expected to send CMSG_NPC_CLOSE
as well.
Closes #91
Closes #107
Closes #108
|
|
This was broken by 79e4325192f3260ed4ded264e43da8429650bf72 due to there
being a case difference between the serverTypeToString and parseType
functions, causing loaded servers to be invalid due to unknown server
type.
Closes #105
|
|
When compiled with MinGW, the va_list overload of Logger::log was chosen
where a char* was passed, causing a crash at runtime.
Resolved by renaming the va_list version to Logger::vlog.
|
|
Closes #100
|
|
Can avoid some memory allocations. Also simplified its implementation a
little.
Also made ChatLogger::getDateString use the full year.
|
|
getWalkMask() and getCollisionRadius() are not going to return different
values each time, so assign them to a local variable.
Also marked LocalPlayer::getNextWalkPosition const.
|
|
Mainly using std::vector<std::unique_ptr<Item>> to automate memory
management.
|
|
When we use SDL_PIXELFORMAT_RGBA32, which is actually the same as
SDL_PIXELFORMAT_ABGR8888 on little-endian systems, we can cast the pixel
data directly to SDL_Color* for easy access to the components.
This may also make applying dye more efficient on big-endian systems,
though I have no such system to test with.
Follow-up to d8b871727c363892b14f2eadfad8f6058ec6ab72.
|
|
|
|
The window needs to be slightly larger on Jewelry theme. By not
specifying a width, the layout will take care of this.
|
|
Allows more flexible customization as needed by Jewelry theme.
|
|
Instead of loading images directly, which is less flexible. In Jewelry
theme, these icons are embedded in the window.png image.
|
|
This enables customized outlines for each text color as well as adding
outlines for specific palettes, as done by the Jewelry theme.
Merged PARTY_CHAT_TAB and PARTY_SOCIAL_TAB into just PARTY_TAB since we
should probably be using the same color there anyway.
Split off WHISPER_TAB as separate color from WHISPER.
|
|
Each Skin can point to a different palette, which can be used to tweak text
colors where necessary. For now there is no generic solution for this, instead
a number of locations have been adjusted to take the palette into account:
* ChatWindow sets its palette on the BrowserBox used in its tabs.
* Popup sets its palette on child widgets when they are added (covering
BrowserBox, Label and TextBox).
* ItemPopup now uses its palette when looking up colors.
The BrowserBox now retrieves its numbered text colors from the theme. Also
added OLDCHAT, AWAYCHAT and GLOBAL theme colors, with ##g, ##o and ##a to
choose these colors respectively.
Fixed ImageRect move constructor.
TextPreview class was cleaned up from unused functionality.
Being name colors are no longer different between the name shown on the being
and the name shown in the SpeechDialog.
|
|
* Added Theme dropdown to Interface setup
* Added CARET theme color
* Fixed issue with logging errors in `check` function in `theme.cpp`
* Fixed XML::Children::Iterator to iterate only element nodes
* Changed default theme to "jewelry"
Changing the theme (or font size) shows a dialog that points out a restart is
required to apply these changes. This is necessary at the moment because many
things, like default or minimum window sizes, are only calculated once.
|
|
And made the Jewelry theme hide those buttons.
|
|
Due to getVerticalMarkerDimension and getHorizontalMarkerDimension not
being virtual, this unfortunately required copying a lot of code from
Guichan to make sure it calls our versions of these functions.
Also addressed a small issue where gcn::ScrollArea::checkPolicies was
not taking the frame size of the content into account.
|
|
We don't need to keep an array of SubImage instances, but can just
remember the top, left, right and bottom margins and use those when
rendering the scaled ImageRect.
Graphics::drawRescaledImagePattern had to be extended to allow
specifying the source rectangle.
|
|
Used "spacing" to store the additional space between the sticky button
and the edge of the window (or the close button).
Adjusted Popup and ToolWindow skins by one pixel to make the sticky
button align the same way as for the Window skin.
|
|
Now we can define icon names for each equipment box and then look up the
icon image through the theme, enabling some shared control over
equipment slot icons between the game data and GUI theme.
The icon for an equipment slot is also no longer rendered when the slot
has an item in it.
Removed the needless storing of equipment box positions and images in
the EquipmentWindow, because this information is readily available from
the InventoryHandler and the images are already loaded by the Theme.
|
|
* 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.
|
|
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.
|
|
This theme was created by Francesco Miglietta in 2012-2013 for ManaPlus
and is hereby ported to the new XML theme definition supported by the
Mana client.
A few things are still missing:
* Use of special window skins for some windows (minimap, chat, shortcuts)
* Control of text format in chat window and popups
* Theming the equipment box icons
* Support for fixed-size scroll bar handles
* Not all colors set by the theme are supported yet
There is also still no way for the user to choose the theme in the Setup
dialog. For now, the theme can be enabled by manually editing the config
file to contain:
<option name="theme" value="jewelry"/>
|
|
The images returned by IMG_Load_RW appear to usually be in the format
SDL_PIXELFORMAT_ABGR8888. As such, adjust the code performing the dye to
operate on this format rather than always converting the surfaces to
SDL_PIXELFORMAT_RGBA8888.
This appears to make the loading of dyed images about 30% faster.
|
|
|
|
|
|
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.
|
|
* Removed some unused includes and forward declarations.
* Use std::unique_ptr to automate cleanup.
* Use TextRenderer::renderText in BrowserBox to avoid code duplication.
* Removed unused STATE_NORMAL from StateFlags.
* Small layout fix in ServerDialog.
* Reduced rewrapping delay in BrowserBox to 33ms and disabled it
entirely when there are no more than 1000 lines to rewrap. The
rewrapping is usually fast enough.
|
|
Needs to allow space for all three buttons, especially since they are no
longer clipped to the window.
|
|
* Displayed Being was deleting its SpeechBubble after the
WindowContainer had already deleted it. Resolved by registering a
DeathListener.
* On dialog deletion, the CharHandler had become a roaming pointer but
was still accessed.
|
|
Added handling of padding and text format and added new "spacing" skin
variable which is used for the space between the label and the control
in case of CheckBox and RadioButton.
Small tweaks to UI layout in various places.
|