summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-04-07Moved basic widgets into the gui/widgets directoryBjørn Lindeijer1-724/+0
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-28Add a sticky button to the Window classJared Adams1-5/+53
The Minimap window uses this so you can froce it to always be open. The Minimap toggle button can be used to show or hide it temporarily, as warping will reset it's visibility based on the sticky state and weather the 'new' map has a minimap.
2009-03-28Removed a lot of useless isVisible() checksBjørn Lindeijer1-3/+0
The draw() method of a widget isn't called when a widget is not visible.
2009-03-27Removed unnecessary parenthesis on constructorsBjørn Lindeijer1-1/+1
2009-03-27Merge branch 'aethyra/master'Bjørn Lindeijer1-51/+13
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-27Fixed include structure in resource/ directoryBjørn Lindeijer1-1/+1
There is also a new rule that trivial constructors and destructors should no longer be trivially "documented", since this just takes up space with no gain.
2009-03-26Compile warning fixesBjørn Lindeijer1-9/+4
Mostly unsigned/signed mismatches and an unused variable.
2009-03-27Compile warning fixesBjørn Lindeijer1-9/+4
Mostly unsigned/signed mismatches and an unused variable.
2009-03-26Some code cleanups (mostly reducing how many calculations need to beIra Rice1-9/+2
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-25A host of code style fixesBjørn Lindeijer1-1/+1
Mostly putting & and * in the right place and making some getters const.
2009-03-25Modified skin loading to save and load a skin's XML path, as well asIra Rice1-1/+11
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-25Moved the responsibility for skin alpha adjustment to the Skin class.Ira Rice1-41/+0
This fixes a break that occured where skins wouldn't update in real time in the client, due to being passed a reference, rather than getting the skin itself. Signed-off-by: Ira Rice <shogun@odin.(none)>
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-230/+205
Conflicts: Many files.
2009-03-19Make sure positionable dialogs start out centeredJared Adams1-4/+16
2009-03-18Fix up the NPC interraction widnows a bitJared Adams1-1/+1
2009-03-18Fix up the NPC interraction widnows a bitJared Adams1-1/+1
2009-03-15Fix some mem leaksJared Adams1-0/+2
2009-03-14Exposed the progress bar colors to the color management tab.Ira Rice1-0/+6
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-14Made a label class derived from the guichan label class which utilizesIra Rice1-1/+2
the palette colors. While technically, this can be accomplished through other means, it's rather clumsy overall, and is prone to introducing in programmer errors. This commit finally catches every case where text is used, and applies the text color from the color dialog to each of them appropriately. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-12Added a class for rendering of floating textsniper1-0/+1
This is a header only-class that merges the textrendering of the TextParticle and Text classes. It is done to reduce code duplication and to prepare some color configuration gui.
2009-03-11Enforce minimum widths and heights to be at least as big as the minumumIra Rice1-2/+3
width and height for the skin used. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-11Modified Skin class to use proper encapsulation, instead of leaving itsIra Rice1-9/+9
skin variables public. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-11Added a new Popup class, which overall is functionally similar to theIra Rice1-31/+30
Window class, but stripped down to the bare essential functionality to just draw and position them. This means no resizing, no close buttons, no ability to move them, etc. This should help reduce the overhead in drawing speech bubbles, as well as other popup type dialogs, but is also not a drop in replacement for the Window class as well. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-11Moved the Skin class outside of the Window class, in order to allowIra Rice1-148/+8
other widget containers to use skins as well, and to make it easier to extend later. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Introduced in a Skin holder class, to reduce the amount of needed XMLIra Rice1-38/+59
skin loads. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Fix some mem leaksJared Adams1-2/+0
2009-03-10Fix some mem leaksJared Adams1-0/+2
2009-03-10Fix some mem leaksJared Adams1-0/+2
2009-03-10Allow for offsets for the enumerated position version ofIra Rice1-16/+15
setLocationRelativeTo as well. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Extended window layout to take relative positions, as well as offsets toIra Rice1-0/+99
that position. This makes it so that when resolutions are changed, the default locations stay relative to the window's position, and not the 800x600 screen resolution. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Allow NPCList dialog to use it's old locationJared Adams1-2/+2
2009-03-10Reverted last commit (since I confused it with something else) as wellIra Rice1-2/+6
as removed a redundant call for sizing in the minimap class. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Fixed setContentSize in the window class to only care about exceedingIra Rice1-6/+2
the maximum width and height. Exceeding the minumum width and height is a desireable case in some situations. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Moved enforcement of minimum widths and heights to the Window class.Ira Rice1-9/+44
This was needed in the Minimap class, but not migrated out to the Window class until now. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Made it so that when windows load previous states, they are neverIra Rice1-16/+25
smaller than the minimum width and height (a check that should have been enforced in the first place), as well as modified the NPC list and text dialogs to remember where they were when they were moved or resized last. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-09Got rid of an ugly and unified interface breaking cancel button in favorIra Rice1-1/+6
of adding overridable close functionality to the Window class. Now, if you need a close button, but need to do something different, or in addition to the Window close functionality, you can override it and do that action. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-06Cut down on redundant constant int declarations in the windows skinningIra Rice1-68/+6
code. While this shouldn't do too much, if anything, for performance, it makes maintenence easier in the future if only one set of ints needs to be modified rather than 9 when they do the same thing. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-06Merge branch 'aethyra/master'Bjørn Lindeijer1-0/+3
Conflicts: src/being.cpp src/being.h src/floor_item.cpp src/floor_item.h src/flooritemmanager.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/popupmenu.cpp src/net/beinghandler.cpp src/npc.cpp
2009-03-05Made some optimizations based on some profiling done by Octalot, as wellIra Rice1-0/+3
as some other optimizations that I could see that cut down on some unneeded redraws, which in turn improved frame rates slightly. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-15Removed unnecessary parenthesis at constructorsBjørn Lindeijer1-2/+2
When not passing any parameters to constructors, there is no reason for using parenthesis.
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-09Mostly whitespace fixesBjørn Lindeijer1-16/+16
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-02-09Bjørn Lindeijer1-7/+9
Conflicts: A lot of files...
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-16/+16
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-02-09Merged with Aethyra master as of 2009-01-27Bjørn Lindeijer1-36/+213
Conflicts: Almost everywhere.
2009-02-04Few more unneeded headers that weren't noticed originally in the lastIra Rice1-2/+0
commit. Also, while the overall performance improved a little, it doesn't appear to be as drastic as the last commit was suggesting. 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-30Exposed most gui elements to take alpha values. There are still a fewIra Rice1-0/+1
spots that could also be fixed up as well, but require other methods to fix them (the filled color rectangles on the progress bars, as well as the text on them as well, as an example). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-30Re-enabled real time gui opacity updating.Ira Rice1-3/+8
Signed-off-by: Ira Rice <irarice@gmail.com>
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.