summaryrefslogtreecommitdiff
path: root/src/gui/widgets
AgeCommit message (Collapse)AuthorFilesLines
2012-08-05Removed all the hardcoded sizes of the various setup tabsThorbjørn Lindeijer6-10/+51
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-05-07Merge branch '0.6'Thorbjørn Lindeijer1-9/+9
2012-05-07Fixed wrong offset values for tab widget drawingjurkan1-9/+9
Mantis-Issue: 423 Reviewed-by: Thorbjørn Lindeijer
2012-05-05Merge branch '0.6'Thorbjørn Lindeijer2-1/+3
2012-05-05Fixed compilation errors and warnings with GCC 4.7Thorbjørn Lindeijer2-1/+3
Also, since GCC 4.7 there is a binary compatibility issue when linking with a Guichan that was not compiled in C++11 mode. This commit also allows compiling with GCC 4.7 with C++11 mode turned off. Reviewed-by: Erik Schilling
2012-04-02Merge branch '0.6'Thorbjørn Lindeijer2-4/+3
2012-04-02Fixed problems with using the last emoteThorbjørn Lindeijer1-3/+2
The tmwa/BeingHandler was adjusting the effect id rather than the emote id, causing it to not find the last emote (and the rest of the emotes only worked correctly because the effect ids were consecutive in the same order as the emote ids). Furthermore, the EmoteShortcutContainer refused to draw the icon for the last emote due to an off-by-one error in dealing with the 1-adjusted emote ids used by the EmoteShortcut class. Also cleaned up some old remains of a player ignore strategy that used to use the two balloon emotes (this had been their original purpose). Reviewed-by: Erik Schilling
2012-04-01Made changes to compile on Mac OSX 10.6 and laterDavid Athay1-1/+1
Also added Xcode project for others to compile for Mac OSX. Reviewed-by: Thorbjørn Lindeijer
2012-02-18Added notification sound on receiving whisperThorbjørn Lindeijer3-3/+32
One of the sound channels is reserved for notification sounds, of which the volume can be configured separately. Currently, the only notification sound that is played is for receiving whispers. That can be extended later. The newmessage.ogg sound used currently is the one for receiving a message with the Psi instant messenger. Parts of this patch are based on the new message notification in ManaPlus. Reviewed-by: Erik Schilling
2012-02-12Fixed inventory displayYohann Ferreira1-3/+6
The filter system added while ago used to override the item slot true order, even when being empty. I now made the draw ordering change only when the filter is in use. Reviewed-by: Thorbjørn Lindeijer
2012-02-11Fixed issues with the help texts and small NEWS file updatesThorbjørn Lindeijer1-6/+0
* Changes were made to the way BrowserBox does colors that the help files were not adapted to. For example, there is no more ##P for choosing the previous color and applying a color changes it persistently rather than returning to default text color after each line wrap. Rather than changing the behavior of BrowserBox back I've just adapted the help files. * Set a monospace font on the Help window because this was originally the case and the text still relies on that for its layout. * zlib and CSV support was already cherry-picked into 0.5.1 so it is removed from the 0.6.0 changelog. Reviewed-by: Erik Schilling
2012-02-10Arbitrary small code cleanupsThorbjørn Lindeijer3-7/+5
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-09Avoid a crash after selecting one's character linked to emotes.Yohann Ferreira1-3/+3
This happened when the emote shortcut config has got too high ids in it, i.e. when testing different client version on the same host. Reviewed-by: Erik Schilling
2012-02-07Made BrowserBox use the recommended line skip for its fontThorbjørn Lindeijer2-48/+61
SDL_ttf provides a separate function for getting the recommended line skip, or the spacing between two lines of text. When rendering multiple lines of text this should be used rather than the visual height of the font. Since the information is only available for TrueTypeFont, a dynamic_cast was used with a fallback on gcn::Font::getHeight. Also made some small tweaks but nothing that really affects performance. Reviewed-by: Yohann Ferreira
2012-02-06Some cleanups in the initialization of wallpaper pathsThorbjørn Lindeijer2-2/+2
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-02-05Fixed some layout issues with the chat windowThorbjørn Lindeijer1-30/+19
One pixel of the scroll bar wasn't visible since the mWidgetContainer is shifted by one pixel by gcn::TabbedArea::adjustSize, which wasn't being taken into account by our custom mWidgetContainer sizing code. Fixed that by just letting Guichan handle it. Another issue was that the tab scroll arrows were appearing before they were needed, since they took into account their own size when checking whether the tabs had enough space. Finally, a Layout has a default padding of 6 pixels but this is a little much for the chat window. I reduced it to 3 pixels now. Reviewed-by: Erik Schilling
2012-02-03Changed the setup button at login stage to use the icon.Yohann Ferreira2-4/+6
I also made the button not readjust its size when deleted to avoid a crash. Reviewed-by: Erik Schilling
2012-01-31Added missing copyright notices.Yohann Ferreira6-1/+7
Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer85-85/+85
2012-01-26Removed 'inline' keyword where it's not of any valueThorbjørn Lindeijer3-10/+10
Members that are implemented inline are already inline, there is no need to mark them as such. Made two inline members of OpenGLGraphics private since because they are marked as inline, they can't be used from other classes. Reviewed-by: Erik Schilling
2012-01-22Allow resizing of the game in windowed modeThorbjørn Lindeijer4-57/+59
Window positions are semi-smartly corrected as a result of the resize. Not supported when using OpenGL on Windows for now. Reviewed-by: Yohann Ferreira
2012-01-20Made the ignore record parameter usefulErik Schilling1-1/+1
Reviewed-by: Bjorn.
2012-01-16Renamed some file names for consistency with the class namesThorbjørn Lindeijer4-4/+4
This was already done by ManaPlus. It's a good idea anyway and it makes comparing the code a little easier. Reviewed-by: Yohann Ferreira
2012-01-15Show item quantity in the shop listThorbjørn Lindeijer1-23/+40
Rather useful when selling items to quickly see what you have in abundance, rather than only seeing the quantity of the selected item. Reviewed-by: Yohann Ferreira
2012-01-10player_node -> local_playerYohann Ferreira2-2/+2
Reviewed-by: Ablu
2012-01-09Changed INT and DELETE enum names to fix C::B compilation.Yohann Ferreira2-2/+2
This was introduced since Crush updated his mana lib pack. I simply changed the names to avoid a collision. Reviewed-by: Ablu.
2012-01-09Made the chat text much more readable in every opacity case.Yohann Ferreira4-4/+94
I added text shadow and outline support to the browserbox, and made it adapt the text for the chattabs depending on the GUI opacity. Reviewed-by: Ablu.
2011-11-12Removed hiding of button popup when setting the text to emptyYohann Ferreira2-8/+2
The text is never set to an empty string, especially not while the mouse is over the button. The popup will be updated or hidden by mouseMoved anyway. Reviewed-by: Thorbjorn Lindeijer
2011-11-12Removed some Channel and ChannelTab related sillinessThorbjørn Lindeijer1-5/+0
* Channel always has a ChannelTab, so need to check it for null * Removed duplicate handling of 'topic' command * No need to set Channel::mTab twice Reviewed-by: Yohann Ferreira
2011-11-12Fixed the button popup incorrectly shown when loading the window menu.Yohann Ferreira1-3/+1
This was due to a small logic error when setting the popup text. Reviewed-by: Erik Schilling
2011-10-23Fixed a certain class of Doxygen warningsThorbjørn Lindeijer6-20/+12
All cases of documentation for non-existing parameters are now fixed. Also marked a few getters as 'const', removed some superfluous 'inline' keywords and removed the unused 'forceQuantity' option from ItemContainer. Reviewed-by: Yohann Ferreira
2011-09-29Fixed item popup still visible after closing inventory window.Erik Schilling3-1/+8
Reviewed-by: Bertram.
2011-09-28Small changes requested by o11c - part 1.Yohann Ferreira2-3/+8
2011-09-28Added true arrows graphics to tab area buttons.Yohann Ferreira2-3/+7
2011-09-28Made the button icon only shown when the icon file is valid.Yohann Ferreira2-7/+8
And falls back to the text based caption otherwise.
2011-09-28Changed the Social button to an image one.Yohann Ferreira2-6/+8
I also made the client able to keep the old behaviour, and i changed the button api to not require the icon frames size as it could easily guess them.
2011-09-28Added textpopup on mouse hovering support to buttons.Yohann Ferreira2-1/+72
I added a use of it to the menu buttons.
2011-06-17First pass on removing tile hard coded values.Yohann Ferreira1-2/+0
Every files has been checked against the hard coded 32 values except the map.cpp file. I also added convenience functions in the Game class, centralized the default item icon size, and removed two unused defines in being.cpp.
2011-06-16Fix the off-by-one error reported in the issue comments.Yohann Ferreira1-2/+1
Trivial fix.
2011-06-16Added image support to the button widgets.Yohann Ferreira2-23/+156
Resolves: Mana-mantis #96. Reviewed-by: Crush. Note that the option to set the image position next to the text is still needed and will be handled in another issue.
2011-06-02Fixed missing action event when clicking on a ListBox itemThorbjørn Lindeijer1-0/+5
This event got lost in commit c6a081ba610c5f5f298bc80c2ef28facb41dffae and made it no longer possible to change the client resolution except by pressing Enter or Space after selecting an item.
2011-06-02Arbitrary code cleanupsThorbjørn Lindeijer2-4/+4
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
2011-05-30Remove some uneeded offsettingJared Adams1-2/+2
Also fix position of being names. Reviewed-by: Bertram
2011-05-25Added more double clickable actionsAngelo Castellani1-1/+7
- double clicking a do_choice item submits it - double clicking the npc chat will hit 'next' - double click to buy/sell a single item - clicking on no item in the inventory now deselects - double click to use/activate items in inventory
2011-05-24Extended Guichan with an empty spacer widgetAngelo Castellani2-0/+81
Useful for making nicer layouts Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2011-05-23Fixed listbox selection issueAngelo Castellani2-1/+16
Clicking below the last item of a listbox would select the last item. Made it do nothing instead.
2011-05-13Made the setup keyboard tab prettier.Angelo Castellani1-0/+13
Incidentally I added support for a monospaced font (which may come in handy).
2011-04-09Removed a lot of useless "documentation"Thorbjørn Lindeijer22-99/+10
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-04-09Removed the Mana namespaceThorbjørn Lindeijer1-6/+6
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams