summaryrefslogtreecommitdiff
path: root/src/gui/npc_text.cpp
AgeCommit message (Collapse)AuthorFilesLines
2009-03-25Merge branch 'eathena/master'Bjørn Lindeijer1-7/+55
Conflicts: A lot of files.
2009-03-23Merge branch 'aethyra/master'Bjørn Lindeijer1-1/+7
Conflicts: Many files.
2009-03-22Merged the tmwserv client with the eAthena clientBjørn Lindeijer1-1/+1
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-19Make sure positionable dialogs start out centeredJared Adams1-0/+1
2009-03-10Extended window layout to take relative positions, as well as offsets toIra Rice1-2/+1
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-10Don't center the NPC interraction dialogsJared Adams1-1/+1
Use the last location the user gave instead. Also, do the same for the inventory dialog.
2009-03-10Made it so that when windows load previous states, they are neverIra Rice1-2/+9
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-09Send the correct packet for the NPC close buttonJared Adams1-0/+8
Both packets do the same, but we should be explicit anyways. Also, seperate out NPC client packets.
2009-03-09Send the correct packet for the NPC close buttonJared Adams1-0/+7
Both packets do the same, but we should be explicit anyways. Also, seperate out NPC client packets.
2009-02-26Merge branch 'aethyra/master'Bjørn Lindeijer1-5/+6
Conflicts: data/graphics/images/login_wallpaper.png src/being.cpp src/beingmanager.cpp src/engine.cpp src/game.cpp src/gui/buysell.cpp src/gui/buysell.h src/gui/gui.h src/gui/npc_text.cpp src/gui/npc_text.h src/gui/npcintegerdialog.cpp src/gui/npclistdialog.cpp src/gui/npclistdialog.h src/gui/npcstringdialog.cpp src/gui/sell.cpp src/gui/shop.cpp src/gui/table.cpp src/net/beinghandler.cpp src/net/npchandler.cpp src/net/playerhandler.cpp src/npc.cpp src/npc.h src/shopitem.cpp src/shopitem.h src/utils/stringutils.cpp src/utils/stringutils.h src/utils/trim.h
2009-02-25Fix NPC handling to not need a handle on the NPCIra Rice1-4/+14
Loosely based on TMW commit f04a8713ffc83db8b3dc4a472b28aad25a2b2bd1 Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-25Prevent duplicate NPC talking when using keyboardJared Adams1-0/+1
Based on commit a1e483913672e55704e8fbafeff5ea0ccc0c9b07 from Aethyra.
2009-02-25Fix NPC handling to not need a handle on the NPCJared Adams1-6/+15
The Being ID is used instead, as that is all that was ever really needed.
2009-02-25Make sure that all dialogs are cleared on player death, not just the NPCIra Rice1-0/+1
text dialog. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-24Cleaned up some code, as well as removed redundant talk client requestingIra Rice1-1/+6
(which would happen from using the keyboard instead of the mouse). Signed-off-by: Ira Rice <irarice@gmail.com>
2009-02-24Send a next dialog packet when ending interactionJared Adams1-0/+1
Server seems to want it in some cases
2009-02-24Fixed compile warningsBjørn Lindeijer1-1/+1
Order of initialization and suggested parenthesis.
2009-02-23Clear text from NpcTextDialog when character diesJared Adams1-0/+5
Also hid the integer and string dialogs
2009-02-18Centralize current_npc cleanupJared Adams1-13/+9
2009-02-17Reduce NpcTextDialog to one actionJared Adams1-14/+22
This allows external classes (like game.cpp) to send actions to it without them having to know about it's internal state.
2009-02-16Fixed up NPC dialogs to behave more like eAthena expects.Jared Adams1-8/+11
2009-02-16Fix some compilation issuesJared Adams1-1/+1
2009-02-16Add next/close buttons for NPCsJared Adams1-6/+27
And keep the text dialog open for the whole transaction, logging user input and keep a full record of text from the NPC (for the current transaction only).
2009-02-15Fixes some variable names to conform to naming conventionBjørn Lindeijer1-6/+6
Please do remember that member variables are prefixes with 'm', so that they are easily distinguishable.
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-04Went through the gui folder and revised the include statements to notIra Rice1-3/+1
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-28Consolidated setMinWidth into textWrap, since all lines are dependantIra Rice1-12/+2
upon knowing what dimension they have to wrap to or beat in order for text wrapping to work. By adding this to be initiated at the same time as the text wrapping is done, this should decrease visual artifacts caused by not initializing it properly to begin with. Also made the item popups compact to the minimum dimension. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-28Moved NPC text back to using the textbox. Rationale is that the textboxIra Rice1-13/+27
code is in much better shape than the browserbox code at the moment, and that the move to using the browserbox was a bit silly, as textbox already wraps. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-26Fixed a few default window sizes so that they look better for first timeIra Rice1-1/+1
client loaders. 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-20Fixed window transparency in NPC text (because the browser box was toldIra Rice1-1/+1
to be opaque, the text area in the NPC window wasn't transparent, and was rather noticeable using Aethyra's color scheme, cause it shows up as white) Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-20Removed the now uneeded add calls, which I accidently left in twoIra Rice1-3/+0
commits ago. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-20Reflowed NPC text dialog to use the layout code, so that window resizingIra Rice1-6/+11
isn't broken. Also added a string which should be translated in the Buy class for substitution by gettext. Signed-off-by: Ira Rice <irarice@gmail.com>
2009-01-20Switch the NPC text dialog over to a BrowserBoxJared Adams1-32/+14
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>
2008-12-07Merge commit 'a7c21e6f8add37af7412449742ec55c8daa8571a'Ira Rice1-1/+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-12-07Fixed wrapping in some cases, removed draw methodBjørn Lindeijer1-15/+8
The 'draw' method was confusingly named, and was actually for updating the GUI after a resize. Its functionality has been merged into 'widgetResized'. The wrapping was broken in the case where text was added to the NPC dialog, cause it was added to an already wrapped string, causing the wrapping to become permanent. Sorry for all the reformatting. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl> (cherry picked from eAthena commit 43eb6ba950dd8bf978e539c7c7460ef5096438de) Conflicts: src/gui/npclistdialog.cpp src/gui/npclistdialog.h
2008-12-07Made NPC dialogues resizeable.Ira Rice1-4/+33
Conflicts: src/gui/inventorywindow.cpp src/gui/npc_text.cpp (cherry picked from eAthena commit 523eed88816298b1660ecb9e67db80776e4007bb)
2008-12-06Fixed NPC dialogs so that they properly wrap. Broken by the last cherryIra Rice1-0/+5
commit. Signed-off-by: Ira Rice <irarice@gmail.com>
2008-12-06Fixed wrapping in some cases, removed draw methodBjørn Lindeijer1-13/+8
The 'draw' method was confusingly named, and was actually for updating the GUI after a resize. Its functionality has been merged into 'widgetResized'. The wrapping was broken in the case where text was added to the NPC dialog, cause it was added to an already wrapped string, causing the wrapping to become permanent. Sorry for all the reformatting. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2008-12-07Fixed wrapping in some cases, removed draw methodBjørn Lindeijer1-15/+8
The 'draw' method was confusingly named, and was actually for updating the GUI after a resize. Its functionality has been merged into 'widgetResized'. The wrapping was broken in the case where text was added to the NPC dialog, cause it was added to an already wrapped string, causing the wrapping to become permanent. Sorry for all the reformatting. Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
2008-12-07Made NPC dialogues resizeable.Ira Rice1-4/+33
(cherry picked from Aethyra commit 81299ca9acc39dec62e1e504781721ad0db0d471) Conflicts: src/gui/inventorywindow.cpp src/gui/npc_text.cpp
2008-11-18Pedantic fixes to the client, where I alphabetized all of the include Ira Rice1-4/+1
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-01Made NPC dialogues resizeable.Ira Rice1-8/+33
2008-10-25Made the ok dialogue use code that's similar to the speech bubble, so Ira Rice1-1/+2
that it can take advantage of the text box's wrapping code.
2008-10-10Did a little bit of code cleanup (mostly from TMW changes) as well as Ira Rice1-0/+2
properly implemented line wrapping. Now, there are no more visual artifacts for speech boxes, and it always chooses the most optimal box size (which required that npc_text use it also. Do any other gui classes use the textbox class?).
2008-07-18Import of client treeLloyd Bryant1-1/+1
2008-05-04Merged revisions ↵Bjørn Lindeijer1-4/+4
4031-4044,4046-4058,4061-4062,4064,4066-4067,4069-4070,4072-4079,4082-4092,4094-4097,4099,4101-4109,4112-4115,4117-4129,4131-4150 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4031 | the_enemy | 2008-04-03 14:53:00 +0200 (Thu, 03 Apr 2008) | 1 line Tweaked disconnect dialog to fix crash bug id=250 ........ r4050 | b_lindeijer | 2008-04-07 19:37:23 +0200 (Mon, 07 Apr 2008) | 2 lines Merged changes made for the 0.0.24.1 release (4046:4048 from 0.0.24 branch). ........ r4066 | b_lindeijer | 2008-04-10 23:48:36 +0200 (Thu, 10 Apr 2008) | 2 lines Fixed compile warning. ........ r4076 | b_lindeijer | 2008-04-12 20:36:15 +0200 (Sat, 12 Apr 2008) | 3 lines Fixed display of item shortcut container. gcn::Widget::setWidth is no longer virtual. ........ r4079 | crush_tmw | 2008-04-14 09:50:25 +0200 (Mon, 14 Apr 2008) | 1 line Fixed multi-channel image dyeing (patch by fate) ........ r4096 | b_lindeijer | 2008-04-16 10:39:59 +0200 (Wed, 16 Apr 2008) | 3 lines Restored the text wrapping in TextBox, since it was based on overriding a method that is no longer virtual in Guichan 0.8.0 (gcn::TextBox::setText()). ........ r4097 | peaveydk | 2008-04-16 13:27:31 +0200 (Wed, 16 Apr 2008) | 1 line Fix a basic_string::at sometimes being out of range in BrowserBox::draw when checking for line separators. ........ r4099 | peaveydk | 2008-04-16 13:50:12 +0200 (Wed, 16 Apr 2008) | 1 line Also fix potential out of range in BrowserBox::draw when checking for color codes. ........ r4150 | b_lindeijer | 2008-04-20 21:24:33 +0200 (Sun, 20 Apr 2008) | 2 lines Forgot to remove the sound effects apparently, removed now. ........