summaryrefslogtreecommitdiff
path: root/src/gui/setup_video.h
AgeCommit message (Collapse)AuthorFilesLines
2025-03-24Expanded GUI theming capabilitiesThorbjørn Lindeijer1-1/+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-01-21Replaced include guards with #pragma onceThorbjørn Lindeijer1-4/+1
Thanks to https://github.com/cgmb/guardonce and a follow-up replace to remove duplicated newlines at end of file: find src -type f -name '*.h' -exec \ sed --in-place -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Source: https://unix.stackexchange.com/questions/81685/how-to-remove-multiple-newlines-at-eof Fixes compile on macOS, which appears to have been due to the EVENT_H include guard.
2024-10-04Removed useless LocalPlayer::mUpdateNameThorbjørn Lindeijer1-5/+0
Maybe it once had a use, but a change in the "Show own name" setting is already handled by LocalPlayer::event.
2024-03-22Added support for scaling the outputThorbjørn Lindeijer1-0/+5
* Added "Scale" user option, which can either by "Auto" or an explicit scaling factor. Its maximum value depends on the current resolution. The "Auto" factor is based on keeping the logical resolution on at least 800x600, wheres the maximum scale is based on keeping the logical resolution on at least 640x480. * Enabled support for High DPI. This means the rendering target can now have a different resolution than the window size, which can happen on macOS, Windows and Wayland. The resulting scale is multiplied by the above user-controlled scale. Currently, this looks ugly for non-integer scales, which are not used on macOS and can only be configured on some Wayland compositors. Has not been tested on Windows. * Simplified OpenGL initialization (moved out of _beginDraw). * Made sure _beginDraw/_endDraw sets a clip area also for SDLGraphics.
2024-02-27Added VSync and windowed fullscreen optionsThorbjørn Lindeijer1-10/+8
The configuration and setup UI were adjusted to the new options. This also fixes issues in applying new video settings. Default resolution was changed from 800x600 to 1280x720. VSync is enabled by default while FPS limit was disabled. Display aspect ratio for the resolution options. I had to work around some macOS issues: * Don't change window size when it appears to be "maximized", since it just changes the rendering area while leaving the window maximized. * Unset fullscreen display mode temporarily to allow changing resolutions, otherwise the rendering area no longer matches the screen and mouse input is also off. * Removed SDL_WINDOW_ALLOW_HIGHDPI for now because it causes issues on macOS, since we're not actually handling the scaling factor. A Video class and an SDLGraphics subclass were split off from Graphics. This setup has Less duplication and leaves the OpenGLGraphics and SDLGraphics better separated. Fixes #57 Fixes #58
2024-02-22General code cleanupsThorbjørn Lindeijer1-1/+0
* 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
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-4/+4
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-05-24Broke the setup tab "Video" in twoAngelo Castellani1-29/+2
Added an 'Interface' tab for the items that seemed to fit better there than in 'Video'. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-04-30Revert "Add option for sorting servers list"Stefan Dombrowski1-6/+0
This reverts commits e35b3bdd0a74464e4b4d3b931ca416f0c7864ba6 and e35b3bdd0a74464e4b4d3b931ca416f0c7864ba6. Sometimes the text fields and the list show different server selected, so you don't see to what server you connect. It is a big security risk sending your user name and password to the wrong server. Reviewed-by: Freeyorp, Bertram
2011-03-22Add option for sorting servers list (issue 316)Blue Sans Douze1-0/+6
2010-10-22Changed 'Low CPU' options and related gui widgets name to 'Disable ↵Yohann Ferreira1-2/+2
transparency'. That name is more explicit about what it actually does. Reviewed-by: CodyMartin.
2010-10-17Added Low CPU Mode toggle in video setup. Defaults to On.madcamel@gmail.com1-0/+3
This disables the Image::setAlpha() function, which uses 60% of the client's CPU cycles. When enabled, visual quality is slightly decreased, especially with the particle system. Toggling this setting On from an Off state requires a client restart or the graphics look quite funny. Bertram's addition: - Renamed 'Low CPU' to 'Disable transparency (Low CPU)' in the gui for better understanding. - Removed the sprite display with 30% opacity when disabling transparency since it made monsters and drops be drawn above all layers at full opacity. - Made the OpenGL mode disable the 'low CPU mode'. - Fixed the GUI logic as much as possible. Please note that the GUI opacity slider stays enabled when transparency is disabled even if told to be disabled in that case. Reviewed-by: CodyMartin, 4144, MadCamel.
2010-04-21Add a clear button to the NPC dialogJared Adams1-0/+2
Reviewed-by: Bertram
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-13Changed FPS display from a text field to a labelThorbjørn Lindeijer1-4/+1
Not really useful to be able to edit it by hand.
2010-02-08Delete models explicitly rather than relying on booleansThorbjørn Lindeijer1-2/+7
It is more clear in the end. Also fixed deleting of the mode list model.
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 )
2010-01-11Cleanup GUI classesJared Adams1-1/+1
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2010-01-10Show monster inflicted damage.Andrei Karas1-0/+2
Disabled by default.
2009-10-14Add more detail to DebugWindowJared Adams1-0/+4
2009-05-11Removed scroll laziness and scroll radius options. Both of these wereTametomo1-11/+0
partially broken, and my experience has been that players have been frustrated more by accidentally setting them than actually wanting them. They'll still be settable in the configuration file for anyone who needs them, but they seem more like a programmer's debugger than a useful option. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-05-11Unduplicated the mapping to string representationBjørn Lindeijer1-1/+2
Based on a similar change Tametomo made in Aethyra.
2009-04-25Font size change in the guiBlue1-0/+4
Added support for change font size in the setup menu (video tab). You can select small (11), normal (12), large (13), very large (14). You need to restart the client for it takes effect.
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-2/+4
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.
2009-03-27Fixed name of "UpdateSliders" and reduced redundant docsBjørn Lindeijer1-2/+0
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-0/+6
Conflicts: A lot of files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-0/+2
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-02-19Added a pickup notification as particle effect. Also make a ui option to ↵Majin Sniper1-0/+6
enable/disable this effect (default is off) and another option to disable the pickup notification in the chat log (default is on).
2009-02-15Merge branch 'aethyra/master'Bjørn Lindeijer1-1/+0
2009-02-15Deleted some unneeded delete statements.Ira Rice1-1/+0
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-15Merge commit 'aethyra/master'Bjørn Lindeijer1-2/+10
Conflicts: CMakeLists.txt configure.ac data/help/header.txt packaging/windows/setup.nsi po/POTFILES.in src/being.cpp src/being.h src/game.cpp src/gui/color.cpp src/gui/color.h src/gui/equipmentwindow.h src/gui/popupmenu.cpp src/gui/recorder.cpp src/gui/setup_colors.h src/gui/setup_keyboard.cpp src/gui/setup_keyboard.h src/gui/skill.cpp src/gui/speechbubble.cpp src/gui/speechbubble.h src/gui/table.cpp src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/main.cpp src/main.h src/map.cpp src/resources/colordb.cpp src/resources/colordb.h src/resources/emotedb.cpp src/resources/emotedb.h src/text.cpp src/text.h src/tmw.rc src/winver.h
2009-02-10Fixed header files, as well as removed the unused buddy list class (notIra Rice1-2/+3
useful since buddy lists are tracked through the player relation interface instead) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-10Made sure to clean up after all of the dangling pointers in theIra Rice1-0/+7
Setup_Video tab. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-10Added two more options for displaying speech overhead (don't show it atIra Rice1-2/+3
all and show speech bubbles without names). Since a checkbox won't work any more for all of these modes, it's now a slider. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-04Went through the gui folder and revised the include statements to notIra Rice1-2/+0
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>
2009-01-25Removed the TMW branding from header guardsBjørn Lindeijer1-2/+2
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-18Fixed layout of video setup page when translatedBjørn Lindeijer1-5/+5
Introduced a LayoutHelper class which can be used for any non-Window container where you want to use a layout to place child widgets.
2009-01-15Style cleanups throughout most of the code. Splitting function type fromIra Rice1-7/+4
the function names should no longer be around. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Added the ability to see your own name in game.Ira Rice1-0/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
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-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-10-15Added patch so that players can turn on or off speech bubbles.Ira Rice1-0/+2
2008-10-14Early addition of a particle effect disabling option. Would like to Ira Rice1-0/+2
change this in the future to update instantaneously.
2008-07-18Import of client treeLloyd Bryant1-1/+1
2008-06-04Added switch option drawing nicknames only if mouse hover. Useful in crowded ↵Mateusz Kaduk1-0/+2
places.
2008-05-28Added slider for controlling particleEmitterSkip (overall quality of ↵Philipp Sehmisch1-0/+4
particle effects) to video setup menu.
2007-01-14Merged 0.0 changes from revision 2988 to 3035 to trunk.Bjørn Lindeijer1-2/+3