summaryrefslogtreecommitdiff
path: root/src/gui/itempopup.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-09-28Removed getter/setter cruft from ItemInfoThorbjørn Lindeijer1-8/+8
Made the class and the code in general more readable by removing all the needless getters and setters.
2024-04-08Use ResourceRef<Image> in more placesThorbjørn Lindeijer1-17/+4
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-03-28Fixed size and child positions for various popupsThorbjørn Lindeijer1-30/+19
Most prominently, fixes the tooltips on the window buttons being clipped due to their position being slightly outside of the clipping children area. And fixes NPC tooltips from having a lot of empty space below the NPC name. Also reduced the space between texts in the item tooltip to match the padding rather than being an entire empty line.
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-13General code cleanupsThorbjørn Lindeijer1-2/+1
* 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-02-09C++11: Use default member initializersThorbjørn Lindeijer1-2/+1
This patch is not exhaustive.
2024-02-05Updated C++ standard to C++17Thorbjørn Lindeijer1-7/+1
C++17 should be universal enough by now. This raises the minimum CMake to 3.8, which should also pose no problem since Ubuntu 18.04 already shipped with CMake 3.10. C++17's 'if' initialization statement is now used in an efficient implementation of 'join' for vector<string>, found on StackOverflow.
2024-01-29Apply C++11 fixitsThorbjørn Lindeijer1-3/+2
modernize-loop-convert modernize-deprecated-headers
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-5/+5
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-08-18Improved equip slots description for both protocols.Yohann Ferreira1-0/+3
Now the itempopup is also telling what equip slot is under the mouse pointer.
2011-08-18Add functions to make the item popup able to tell whether the itemYohann Ferreira1-1/+31
is equipped or not. It will be used quite soon to visually see the slot names.
2011-01-24Refactored the item loading in a more extensible and per protocol way.Yohann Ferreira1-39/+41
This will greatly help into upgrading the need of each protocol separately. This is the first step to a new item and equipment system for manaserv. A subclassing of the EquipmentWindow will be done in the next commit, as requested by Thorbjorn. Reviewed-by: Thorbjorn.
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-17/+18
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-08-26Merged testing branch into master.Yohann Ferreira1-7/+16
2010-08-18Fixing overlapping icons in item popupsStefan Dombrowski1-17/+18
The bug could not be reproduced by everyone. Many thanks to Jaxad0127 for testing it on an affected system. This patch resolves http://bugs.manasource.org/view.php?id=191 Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-08-09Replace remaining gcn::Label instances with Label instancesJared Adams1-1/+2
Reviewed-by: Chuck Miller
2010-08-03Move Theme and UserPalette to the resources folderJared Adams1-1/+1
Reviewed-by: Yohann Ferreira
2010-07-28Centralized configuration default values using the VariableData system.Yohann Ferreira1-1/+1
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-07-19Merge branch '1.0'Yohann Ferreira1-2/+4
Conflicts: src/gui/itempopup.cpp src/item.cpp src/monster.cpp src/net/manaserv/playerhandler.cpp src/net/tmwa/partyhandler.cpp src/npc.cpp src/player.cpp src/resources/itemdb.cpp src/resources/monsterdb.cpp src/resources/monsterinfo.cpp src/resources/npcdb.cpp src/resources/spritedef.cpp
2010-07-11Made the different hard-coded paths and files be now taken from theYohann Ferreira1-1/+3
data/paths.xml configuration file. Also added default gui theme path in branding and default wallpaper path and file searched respectively in the branding and paths.xml files. Hard-coded values are still used as fallbacks. Resolves: Manasource Mantis #148. Reviewed-by: jaxad0127.
2010-05-21Fix compilationJared Adams1-1/+2
2010-05-13Draw item image in item popups.Andrei Karas1-3/+44
Now draw image only in chat item popup. Reviewed-by: Bertram
2010-03-31Removed the ability to assign custom skins to windows/popupsThorbjørn Lindeijer1-2/+0
Old settings are causing it to fall back on the wrong combination of files if old data is in the search path. Reviewed-by: Jared Adams
2010-03-12Split Palette into Theme and UserPaletteJared Adams1-15/+15
Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer
2010-03-01Hide BeingPopup when mouseover WindowsJared Adams1-0/+2
Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Chuck Miller
2010-02-22Cleanup some popup-related code and make sure BeingPopup is includedJared Adams1-17/+0
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
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-0/+1
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-11Cleanup GUI classesJared Adams1-3/+3
Moved remaining widgets into widgets folder, standardized include order, moved TextRenderer out.
2009-07-17Various gettext fixesKess Vargavind1-2/+3
* Merged a few split strings * Fixed some spellings and wordings * Turned a couple of std::cout and std::cerr into logger messages
2009-05-05Hide the item popup when the mouse moves on top of itBjørn Lindeijer1-0/+8
Makes the popup a lot less annoying. Still sticks around in some cases when it shouldn't, which seems to be because of missing mouseExited events from Guichan.
2009-04-29Allow item popups to run off of the top of the screen, as requested, asTametomo1-4/+5
well as fixing the item weight field not showing. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl> (partial cherry-pick)
2009-04-20Reduced the weight of a few gui windows and popups which wrapped theirIra Rice1-45/+18
TextBoxes in ScrollAreas, but never needed to scroll (and disabled both the horizontal and vertical scrollbars, which makes using a scrollarea kind of pointless to begin with). Signed-off-by: Ira Rice <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2009-04-12Cleaned up the ItemPopup class a bitBjørn1-19/+5
Removed methods updateColors, getItemName and getNumRows. The last one was also removed from some other classes.
2009-04-10Some cleanup of the equipment window codeBjørn Lindeijer1-7/+0
Also removed some unnecessary delete statements, since the Popup class already deletes its children and the ScrollArea already deletes its content.
2009-04-09Actually use ItemType instead of shortBjørn Lindeijer1-18/+17
Plus some random cleanups.
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-2/+3
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-04-07Used custom widgets where appropriate and some cleanupBjørn Lindeijer1-13/+12
Replaced many gcn::Label with Label, gcn::Slider with Slider in character creation dialog. Also cleaned up includes.
2009-04-02Attempt to put item popup in a less annoying placeBjørn Lindeijer1-8/+12
2009-03-30Merge item types to remove more #ifdefsJared Adams1-35/+32
2009-03-27Merge branch 'aethyra/master'Bjørn Lindeijer1-27/+24
Conflicts: src/beingmanager.cpp src/gui/confirm_dialog.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/label.cpp src/gui/label.h src/gui/popup.cpp src/gui/popup.h src/gui/scrollarea.cpp src/gui/skin.cpp src/gui/skin.h src/gui/speechbubble.cpp src/gui/window.cpp src/gui/window.h src/localplayer.h src/main.cpp src/net/ea/playerhandler.cpp src/resources/ambientoverlay.h src/resources/dye.cpp src/resources/imagewriter.cpp src/resources/itemdb.cpp src/shopitem.cpp
2009-03-26Some code cleanups (mostly reducing how many calculations need to beIra Rice1-26/+21
done in certain statements, rearranging arguements to make them look cleaner, or overall making the code slightly more flexible) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-26Remove redundancy, fix variable names and other code cleanupsBjørn Lindeijer1-3/+1
2009-03-25A host of code style fixesBjørn Lindeijer1-1/+1
Mostly putting & and * in the right place and making some getters const.
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-27/+39
Conflicts: A lot of files.
2009-03-25Modified skin loading to save and load a skin's XML path, as well asIra Rice1-1/+3
modified the skin loading method to take a default value, in case the value in the configuration file fails to load for one reason or another. While this doesn't directly expose skinning on a per window basis to the user at the moment, it does allow people to change what skins get loaded with which windows now without needing to modify the code. TODO: Determine a decent approach to allowing the user to change their window skins in game, as well as moving all widget skin loading to the skin class (for instance, the button skins, progressbar skins, etc.) so that different skin configurations can use different widget skins. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-25/+32
Conflicts: Many files.