diff options
author | José Ávila <linux@javila.net> | 2005-06-17 07:20:03 +0000 |
---|---|---|
committer | José Ávila <linux@javila.net> | 2005-06-17 07:20:03 +0000 |
commit | c702285ab5c288fc65dacdf81b583890d3b99c63 (patch) | |
tree | 589cffa9c16d15f18df4c988bbe300806e6f6425 /src/game.cpp | |
parent | 50b0f0e7ea4508e1ee30f0a0ea8741af6d3212d4 (diff) | |
download | mana-c702285ab5c288fc65dacdf81b583890d3b99c63.tar.gz mana-c702285ab5c288fc65dacdf81b583890d3b99c63.tar.bz2 mana-c702285ab5c288fc65dacdf81b583890d3b99c63.tar.xz mana-c702285ab5c288fc65dacdf81b583890d3b99c63.zip |
new BrowserBox widget with colors/links support
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 95a74568..1023be99 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -38,6 +38,7 @@ #include "gui/confirm_dialog.h" #include "gui/requesttrade.h" #include "gui/help.h" +#include "gui/browserbox.h" #include "net/protocol.h" #include "resources/mapreader.h" @@ -390,6 +391,21 @@ void do_input() int mx = event.button.x / 32 + camera_x; int my = event.button.y / 32 + camera_y; +//================================ By Javila ===============================// + /** + * NOTES: + * - added here just for testing purposes. I think it's better + * add to right mouse button, and put the actual right mouse + * button function as "default" actions in left mouse button. + * - the popup menu can't handle keyboard action/navigation. For + * keyboard input I think we can add slash (/) commands. + */ + if (event.button.button == 2) + { + popupMenu->showPopup(mx, my); + } +//==========================================================================// + if (event.button.button == 3) { Being *target = findNode(mx, my); @@ -971,7 +987,7 @@ void do_parse() // Can I use the item? case 0x00a8: if (RFIFOB(6) == 0) { - chatWindow->chat_log("Failed to use item", BY_OTHER); + chatWindow->chat_log("Failed to use item", BY_SERVER); } else { inventoryWindow->changeQuantity(RFIFOW(2), RFIFOW(4)); } |