summaryrefslogtreecommitdiff
path: root/src/gui/customserverdialog.cpp
AgeCommit message (Collapse)AuthorFilesLines
2025-04-29Fixed compile with ENABLE_MANASERV=OFFThorbjørn Lindeijer1-1/+1
2025-04-02Use a consistent naming style for enum class valuesThorbjørn Lindeijer1-4/+4
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-04-02General code cleanupsThorbjørn Lindeijer1-40/+7
* 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.
2025-04-01GUI: Made CheckBox, RadioButton and Slider more customizableThorbjørn Lindeijer1-5/+5
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.
2025-01-20Made client config statically typedThorbjørn Lindeijer1-2/+0
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-03-02Changed server type to "enum class"Thorbjørn Lindeijer1-5/+5
2024-03-02Added support for -y / --server-type parameterThorbjørn Lindeijer1-1/+1
Usually this would be guessed correctly by the port, but now it is also possible to just specify the server type and the port will be derived from there, unless a default port is given in the branding file. Closes #56
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-7/+7
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-03-21Added default ports when connecting to a custom server.jurkan1-5/+6
When creating a custom server entry, the default port is used if no other port is specified. Reviewed-by: Thorbjørn Lindeijer Mantis-issue: 464
2012-02-18Fixed manaserv-enabled buildsThorbjørn Lindeijer1-7/+7
Wrong define was used in the code.
2012-02-12Restored manaserv-less buildsYohann Ferreira1-0/+16
I made sure the manaserv based custom server don't get deleted when running a manaserv-less client session. Reviewed-by: Thorbjørn Lindeijer
2012-02-07Fixed the server type selected when modifying a custom server.Yohann Ferreira1-2/+2
Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2012-01-15Center the CustomServerDialog on its parent windowThorbjørn Lindeijer1-1/+2
Also shortened the title of the Custom Server dialog to "Custom Server" since it is also used for editing an existing custom server and not just for adding a new one. And used Window::center() in a bunch of places just to reduce code size. Reviewed-by: Yohann Ferreira
2012-01-13Improved the layout of the custom server dialogThorbjørn Lindeijer1-10/+10
Reviewed-by: Yohann Ferreira
2012-01-10Added a modify button to the server dialog.Yohann Ferreira1-3/+16
This was righteously requested by Ablu as missing when dealing with one's own entries. Reviewed-by: Ablu
2012-01-10Made addition of custom servers be done in a separate window.Yohann Ferreira1-0/+194
Now the first window the user can see is a list of servers which can double-clicked, making it all less cluttered. This commit also makes custom servers able to now have their own titles and their own description, just as the official ones. I also fixed the add entry button being registered twice to the action listener, and the fact that the description wasn't updated properly at windows loading and when adding/removing an entry. Resolves: Mana-Mantis #237. Reviewed-by: Ablu