summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-03-28Add a sticky button to the Window classJared Adams1-2/+4
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-9/+2
The draw() method of a widget isn't called when a widget is not visible.
2009-03-27Fixed position of dots on minimapBjørn Lindeijer1-6/+1
Also made mPx and mPy private and synchronize with mPos on setPosition(). The side effects of setting destination and clearing the path have been removed from setPosition(). Only the tmwserv PlayerHandler seemed to rely on that feature. Mantis-issue: 672
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-13/+3
Conflicts: A lot of files.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-13/+0
Conflicts: Many files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-2/+9
This merge involved major changes on both sides, and as such took several weeks. Lots of things are expected to be broken now, however, we now have a single code base to improve and extend, which can be compiled to support either eAthena or tmwserv. In the coming months, the plan is to work towards a client that supports both eAthena and tmwserv, without needing to be recompiled. Conflicts: Everywhere!
2009-03-10Reverted last commit (since I confused it with something else) as wellIra Rice1-1/+0
as removed a redundant call for sizing in the minimap class. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-03-10Moved enforcement of minimum widths and heights to the Window class.Ira Rice1-12/+0
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-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-15Don't make window name translatableBjørn Lindeijer1-1/+1
The window name is used in the configuration file, in contrast to the window title.
2009-02-10Whitespace fixesBjørn Lindeijer1-1/+1
Mainly removed trailing whitespace. Also small fix in header of recorder.cpp.
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-10Whitespace fixesBjørn Lindeijer1-1/+1
Mainly removed trailing whitespace. Also small fix in header of recorder.cpp.
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-2/+2
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-11/+17
Conflicts: A lot of files...
2009-02-09Mostly whitespace fixesBjørn Lindeijer1-2/+2
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
2009-01-30Exposed most gui elements to take alpha values. There are still a fewIra Rice1-2/+0
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-30Changed the minimap to remember whether the minimap was toggled or notIra Rice1-2/+3
when the client was last exited. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-30Fixed the last freestanding minimap bug. Now minimaps behave perfectlyIra Rice1-1/+2
even when there's already a saved window configuration. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-29Fixed up minimap resizing code so that the minimum width is always longIra Rice1-6/+12
enough to contain the map's name. Also fixed an unnoticed logic flip that was done unintentionally. This class now manages to work perfectly when the config file has no previous dimensional influences, but still won't resize properly without removing the ability to resize or getting rid of those stored configs. TODO: Find out why loading window configuration for the default minimum width or height overrides the Minimap's supplied dimensions it wants. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-26Slight bit of code cleanup, as well as minor fixes to logic. For someIra Rice1-9/+19
reason, the windows will gladly shrink when resizeable, but not grow. This will need to get resolved some time later. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-26Made minimaps resizeable.Ira Rice1-4/+13
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.
2009-01-12Fixed minimap so that map names don't overflow the minimap's width.Ira Rice1-4/+8
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Removed close button from minimap windows. While this was a nice idea atIra Rice1-1/+0
the time (and it might be added back in the future), it requires a bit of a change to the window code to fix (not too hard) and its own custom click handler (again, not that hard). Done for the sake of avoiding too much redundancy. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-09Fixed minimap state saving.Ira Rice1-1/+16
Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-06Added support for internationalizationIra Rice1-2/+4
Merged from the mainline client. Originally implemented by Guillaume Melquiond, starting with commit 1828eee6a6d91fd385ad1e69d93044516493aa91. Conflicts: INSTALL configure.ac src/Makefile.am src/gui/buy.cpp src/gui/confirm_dialog.cpp src/gui/inventorywindow.cpp src/gui/login.cpp src/gui/menuwindow.cpp src/gui/minimap.cpp src/gui/ok_dialog.cpp src/gui/popupmenu.cpp src/gui/register.cpp src/gui/sell.cpp src/gui/setup.cpp src/gui/setup_video.cpp Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-06Fixed the windows cbp file, deleted some files which we don't use, andIra Rice1-2/+2
fixed a few compiler warnings noticed from building in windows. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-17Reintroduced window name propertyBjørn Lindeijer1-2/+3
Still used in the eAthena client and it seems saner to me to have it.
2008-12-13Center large minimaps on playerBjørn Lindeijer1-20/+21
Based on a patch by QOAL. (cherry picked from eAthena client) Conflicts: src/gui/minimap.cpp
2008-12-09Make the window shortcuts configurableJared Adams1-6/+6
2008-12-08Small maps used to scroll as well as big maps. Fixed.Ira Rice1-2/+2
Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-08Clip the minimap image to within its windowBjørn Lindeijer1-10/+14
The image wasn't clipped so it would draw beneath the map name and on top of the window border.
2008-12-08Don't scroll past the edges of the minimapBjørn Lindeijer1-0/+12
When centering the minimap on the player, it would often happen that the minimap scrolled past its edge. Based on a patch by QOAL.
2008-12-07Merge commit 'a7c21e6f8add37af7412449742ec55c8daa8571a'Ira Rice1-4/+0
Conflicts: AUTHORS CMakeLists.txt ChangeLog INSTALL README aethyra.cbp configure.ac data/help/changes.txt data/help/commands.txt data/help/header.txt data/help/support.txt src/Makefile.am src/aethyra.rc src/being.cpp src/being.h src/equipment.cpp src/equipment.h src/floor_item.h src/game.cpp src/gui/buddywindow.cpp src/gui/char_select.cpp src/gui/char_server.cpp src/gui/chat.cpp src/gui/chat.h src/gui/equipmentwindow.cpp src/gui/equipmentwindow.h src/gui/gui.cpp src/gui/inventorywindow.cpp src/gui/inventorywindow.h src/gui/itemcontainer.cpp src/gui/itemcontainer.h src/gui/minimap.cpp src/gui/ministatus.cpp src/gui/newskill.cpp src/gui/npc_text.cpp src/gui/npclistdialog.h src/gui/ok_dialog.cpp src/gui/setup_video.cpp src/gui/skill.cpp src/gui/skill.h src/gui/status.h src/gui/table_model.h src/gui/updatewindow.cpp src/gui/viewport.cpp src/inventory.cpp src/inventory.h src/keyboardconfig.cpp src/keyboardconfig.h src/localplayer.cpp src/localplayer.h src/logindata.h src/main.cpp src/map.cpp src/monster.cpp src/monster.h src/net/beinghandler.cpp src/net/beinghandler.h src/net/buysellhandler.cpp src/net/equipmenthandler.cpp src/net/loginhandler.cpp src/net/loginhandler.h src/net/network.h src/net/npchandler.cpp src/net/playerhandler.cpp src/net/protocol.h src/net/tradehandler.cpp src/npc.cpp src/npc.h src/particleemitter.cpp src/particleemitterprop.h src/player.cpp src/player.h src/player_relations.cpp src/resources/imageset.cpp src/resources/imageset.h src/resources/itemdb.cpp src/resources/mapreader.cpp src/resources/monsterinfo.h src/text.cpp src/text.h src/textmanager.cpp src/textmanager.h src/tileset.h src/utils/fastsqrt.h src/utils/strprintf.cpp src/winver.h tools/tmxcopy/Makefile tools/tmxcopy/base64.cpp tools/tmxcopy/base64.h tools/tmxcopy/tostring.h Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-30Fixed map origin formula so that it will work on any map proportion. IIra Rice1-2/+2
accidently screwed this up earlier to make it work on our minimaps that I forgot to check it on a different sized map. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-30Fixed a problem noticed by Jarvellis. Apparently a while ago, toIra Rice1-3/+3
suppress a compiler warning, I added in some typecasts, but did them in the wrong spot, so it broke TMW's minimaps, but still worked on whole number proportions. This fixes that. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-30Fixed up Minimap scrolling so that it actually scrolls (I forgot thatIra Rice1-3/+10
we resized the minimap width by the map's actual width) as well as fixed the centering code so that it works. TODO: Determine a decent way to have the map scroll, but not draw the map below the map area's name. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-11-25Miscellaneous TMW change commits. Missed these changes before because of Ira Rice1-8/+19
a confusion on git.
2008-11-21Center large minimaps on playerBjørn Lindeijer1-15/+19
Based on a patch by QOAL.
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-2/+0
statements, as well as removing the new skill dialog, which we do not, nor will we use (if we do, it'd be a new one that we'd make). WARNING!!! This, and all other previous builds have a linker error for the Gnome libraries version 4.3.2 on my setup. It's assumed that this is also the case for other users of this library as well. I'm currently assuming that there's a bug in the compiler itself, and will look into reporting this, but in the mean time, it doesn't build for these users, unfortunately. Sorry about this.
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-11-16Got rid of CVS/Subversion $Id$ markersBjørn Lindeijer1-2/+0
I don't know why we dealt with these things for so long. Did we ever get anything out of it?
2008-11-01Merged revisions 4110-4111,4116 via svnmerge from Bjørn Lindeijer1-3/+4
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4110 | peaveydk | 2008-04-17 00:57:49 +0200 (Thu, 17 Apr 2008) | 1 line Fix shop list not to scroll to top when selling. Redo of revision 3801 due to changes in guichan 0.8.0. ........ r4111 | peaveydk | 2008-04-17 02:08:28 +0200 (Thu, 17 Apr 2008) | 1 line fixes for r4110, have to account for index value and add 1 to get the right scroll position. ........ r4116 | peaveydk | 2008-04-17 14:48:43 +0200 (Thu, 17 Apr 2008) | 1 line Draw NPCs in yellow on minimap and skip drawing of warps. Based on idea by leeor_net. ........
2008-11-01Added a close button to the minimap so that it matches the other windows Ira Rice1-0/+1
better.
2008-10-23A few more compiler warnings fixed.Ira Rice1-3/+3
2008-10-13Changed minimap code so that it allows us to have larger minimaps, while Ira Rice1-5/+10
putting back in backwards compatibility with TMW style minimaps. While this might seem like a big deal, it also allows us to make minimaps as big as we'd like, which is a huge perk for really large maps or really small ones.
2008-10-09Merged the movement branch into trunkBjørn Lindeijer1-3/+4
I consider this the only way forward. In my tests this code isn't actually doing worse than what was there before. Of course some cases are a bit broken, and I'm open to any kind of feedback so that we can fix those issues.
2008-10-04Changed minimap code to take minimaps twice the TMW size, added map Ira Rice1-5/+5
names on all of the maps, and redid minimaps to fit the new minimap code.