summaryrefslogtreecommitdiff
path: root/src/gui/setup_video.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-10-26Fixed FPS limit being enabled by defaultThorbjørn Lindeijer1-5/+5
There were some inconsistencies between the values set up in `Client::initConfiguration` and those in `getConfigDefaults`. These duplicates have now been removed. For some of these settings the code getting the values had to be adjusted to use getBoolValue, to actually rely on the provided default instead of one provided as a parameter.
2024-10-04Removed useless LocalPlayer::mUpdateNameThorbjørn Lindeijer1-2/+2
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-16/+90
* 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-03-12General code cleanupsThorbjørn Lindeijer1-1/+1
* Use default member initializers * Use range-based for loops * Avoid needless pointer references for ShopItem::mDuplicates * Removed type aliases that are only used once or twice * Removed more unused includes * Removed some unused functions * Removed superfluous .c_str() * Rely on default copy and assignment operators for Vector class * Use std::unique_ptr in some places * Removed duplicated mPlayerMoney updating in SellDialog * Removed duplicated Game::handleInput call * Removed unused SDLInput::mMouseInWindow * Removed remnant of manual widget positioning in HelpWindow * Removed superfluous initialization of static pointers
2024-02-27Added VSync and windowed fullscreen optionsThorbjørn Lindeijer1-166/+174
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-01-26Apply C++11 fixitsThorbjørn Lindeijer1-5/+5
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-25Minor includes cleanupThorbjørn Lindeijer1-3/+0
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-21/+13
2012-08-05Removed all the hardcoded sizes of the various setup tabsThorbjørn Lindeijer1-7/+3
Instead, support for dynamically adjusting layout was added to the Container class. Various other places were also adapted to use the new layout support in Container. Reviewed-by: Erik Schilling
2012-02-09Allow changing fullscreen resolution without restartThorbjørn Lindeijer1-63/+59
Unified Graphics:setFullscreen and Graphics:resize into a single Graphics:changeVideoMode function that tries to restore the existing mode when changing to the new mode didn't work, and exists with an error when that also fails. Split up handling of SDL_VIDEORESIZE and the adapting to new resolution in the Client class, so that the second part could also be called when changing resolution fullscreen mode. The Video tab in the Setup window now also filters out any modes smaller than 640x480 since the game won't properly adapt to that resolution anyway. Reviewed-by: Yohann Ferreira
2012-02-08Reorganized Video settings so that labels have more spaceThorbjørn Lindeijer1-21/+22
I think it also looks a bit more organized overall. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-10-25Change the wrong, but mostly supported WIN32 macro to the correct _WIN32, ↵Bernd Wachter1-2/+2
enforced by -std=c++0x Reviewed-by: Thorbjørn Lindeijer
2011-08-18Removed unnecessary warning about windows that might be movedThorbjørn Lindeijer1-9/+3
Keeping the windows within the visible area is expected behavior, no matter for how long it has been broken. It makes little sense to warn about expected behavior.
2011-05-24Used spacer to pretty up setupAngelo Castellani1-2/+14
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-05-24Widened the setup window by 5pxAngelo Castellani1-1/+1
To make room for the interface tab Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-05-24Broke the setup tab "Video" in twoAngelo Castellani1-207/+19
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-38/+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-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer1-6/+0
I have to admit I contributed a large part of these. Sorry for that. Less empty space, more attention to the code. Acked-by: Jared Adams
2011-03-22Add option for sorting servers list (issue 316)Blue Sans Douze1-0/+38
2010-11-01Merge branch '0.5' of gitorious.org:mana/manaYohann Ferreira1-7/+66
Conflicts: src/being.cpp src/client.cpp src/commandhandler.cpp src/gui/setup_video.cpp src/gui/socialwindow.cpp src/gui/viewport.cpp src/gui/widgets/browserbox.cpp src/gui/widgets/itemcontainer.cpp src/imageparticle.cpp src/localplayer.cpp src/localplayer.h src/map.cpp src/net/tmwa/beinghandler.cpp src/particle.cpp src/particle.h src/player.cpp src/player.h
2010-10-22Changed 'Low CPU' options and related gui widgets name to 'Disable ↵Yohann Ferreira1-28/+32
transparency'. That name is more explicit about what it actually does. Reviewed-by: CodyMartin.
2010-10-18Fixing saving of lowcpu value in configStefan Dombrowski1-7/+3
Trivial fix.
2010-10-17Making the setup for lowcpu robustStefan Dombrowski1-4/+15
Reviewed-by: Bertram, Thorbjorn
2010-10-17Added Low CPU Mode toggle in video setup. Defaults to On.madcamel@gmail.com1-3/+52
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-10-12Little setup tweaksStefan Dombrowski1-2/+2
* Shortening option names that got cropped in video setup * Moving options to the left hand side in player setup, because they looked like they belong to the "when ignoring" part. Reviewed-by: Bertram
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-5/+15
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
2010-09-12Deactivating OpenGL by default on WindowsStefan Dombrowski1-2/+12
For Linux OpenGL was already deactivated. For OSX it is still by default switched on. Reviewed-by: Jaxad0127
2010-09-11Fixing misspelling in Setup_Video and removing empty lines from logStefan Dombrowski1-3/+3
Reviewed-by: Jaxad0127
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-35/+33
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.
2010-06-13Fix memory leaks in different windows.Andrei Karas1-0/+1
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-04-25Fixed the VideoMode listBox logic in the setup window.Bertram1-0/+34
Reviewed by: Jaxad0127
2010-04-21Add a clear button to the NPC dialogJared Adams1-0/+12
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-56/+25
Not really useful to be able to edit it by hand.
2010-02-13Fixed the FPS checkbox, field, and slider not updating properly onTametomo1-13/+19
cancel events. Signed-off-by: Tametomo <irarice@gmail.com>
2010-02-08Delete models explicitly rather than relying on booleansThorbjørn Lindeijer1-1/+8
It is more clear in the end. Also fixed deleting of the mode list model.
2010-02-07Cleanup some memory issuesJared Adams1-1/+1
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-02-06Merged the Engine class into the Game classThorbjørn Lindeijer1-2/+2
There was little point in keeping the Engine class separate. It wasn't an engine at all, but only kept track of the currently active map, a job more suitable for the Game class anyway.
2010-02-01Small cleanups.Bertram1-2/+2
2010-01-12Standardize header orderJared Adams1-0/+1
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-11Cleanup GUI classesJared Adams1-8/+8
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2010-01-10Show monster inflicted damage.Andrei Karas1-0/+15
Disabled by default.
2009-12-16Stored the cached config value which says if non-crucial particle effects ↵Philipp Sehmisch1-0/+2
are enabled or not in a static member of class Particle instead of an instanced member of Being.
2009-10-14Add more detail to DebugWindowJared Adams1-2/+8
2009-08-07Gettext fixesKess Vargavind1-7/+9
Trying to use the same kind of capitalization and interpunctuation for various parts of the gui, melding a few split strings, updating POTFILES.in and adding translators' notes.
2009-07-30Fixed windows loss when changing to a lowered resolution. (Mantis 776)Bertram1-3/+9
2009-07-17Various gettext fixesKess Vargavind1-7/+15
* Merged a few split strings * Fixed some spellings and wordings * Turned a couple of std::cout and std::cerr into logger messages