summaryrefslogtreecommitdiff
path: root/src/gui/widgets/desktop.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08Use ResourceRef<Image> in more placesThorbjørn Lindeijer1-10/+3
Automatic reference counting of images is now used by Item, Icon, AnimatedSprite, ImageSprite, ParticleEmitter, Minimap, Desktop and Emote. Since ResourceManager::get automatically adds a reference, it needs to be explicitly subtracted when the resource is managed by ResourceRef. This is taken care of by the new ResourceManager::getImageRef. Also removed the apprently unused and duplicate "mDrawImage" from Item (which also didn't get decRef called on it). Fixes cleanup of emote ImageSet and ImageSprite instances, as well as particle images.
2024-02-13General code cleanupsThorbjørn Lindeijer1-3/+0
* Removing unused includes * Use member initialization * Use range-based for loops * Use nullptr * Removed no longer used aliases * Use override * Don't use else after return * Use '= delete' to remove implicit members * Use std::string::empty instead of comparing to ""
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-2/+2
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2024-01-25Ported to SDL2Thorbjørn Lindeijer1-21/+3
2012-02-10Arbitrary small code cleanupsThorbjørn Lindeijer1-1/+1
Reviewed-by: Erik Schilling
2012-02-09Fixed wallpaper prescaling issuesThorbjørn Lindeijer1-17/+26
Image::SDLgetScaledImage was changed so that it tries to find an existing scaled version of the image first, and generates it when none exists. When it needs to generate one, this resource is added to the resource manager, partly to avoid duplicating the work later but mainly to keep memory management straightforward. This function also used to leak the scaled SDL_Surface since it wrongly assumed that Image::load would free it. To avoid filling up the memory with scaled wallpapers that are waiting 30 seconds until they will be deleted, the Resource::decRef function was extended with a parameter that allows telling it what to do with orphans. Calling decRef with Resource::DeleteImmediately will delete the resource immediately in case the resource is orphaned. Reviewed-by: Yohann Ferreira
2012-02-06Some cleanups in the initialization of wallpaper pathsThorbjørn Lindeijer1-1/+1
The 'paths' configuration in client-data now overrides any configuration in 'branding', so that it will apply after the updates for a certain server have been downloaded. Also, some isDirectory checks have been removed. When the configuration is wrong, it's probably better to see that there is a problem. Reviewed-by: Yohann Ferreira
2012-01-31Added missing copyright notices.Yohann Ferreira1-0/+1
Reviewed-by: Erik Schilling
2010-10-22Turned the OpenGL and disable transparency options as static members.Yohann Ferreira1-2/+2
- Now OpenGL and the transparency disabling are set at startup and not read again for displaying graphics, preventing graphic errors before startup. - We also agreed long time ago that SDL specific functions should have a SDL prefix. The header has been rearranged a bit to do so. - Also fixed a possible discrepancy in the hasAlphaChannel() function. Reviewed-by: CodyMartin. Resolves: Mana-Mantis: #260.
2010-02-27Report more info on client in cURL useragent and DesktopJared Adams1-1/+11
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-3/+2
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-12Standardize header orderJared Adams1-4/+4
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-11Cleanup GUI classesJared Adams1-0/+1
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2009-08-06Use fillRectangle instead of tiling a colored imageThorbjørn Lindeijer1-18/+6
2009-07-26Fixed a '+' string operation, and attempt to resolve the Mantis 427.Bertram1-1/+18
2009-07-24Made the wallpaper be rescaled when necessary under SDL and OpenGL.Bertram1-4/+23
The SDL methods to rescale the wallpaper has been optimized to permit rescaling at load time while OpenGL draws directly rescaled. Does someone know how to smooth the rescaled image under OpenGL?
2009-04-12Moved client version string creation to preprocessorBjørn1-3/+2
2009-04-12Merge version strings, add version to setup, etcJared Adams1-0/+8
All instances of version strings should now use the same text. The version label was moved from main.cpp to Desktop. A new version label was added to SetupDialog to make it easier to get the version if you are already in game.
2009-04-10Introduced a Desktop widget to handle the wallpaperBjørn Lindeijer1-0/+95
Cleans up main.cpp a little.