summaryrefslogtreecommitdiff
path: root/src/graphic
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 11:32:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-15 11:32:09 +0000
commitaa42c03c8a6b10d4fac03143f06811d94a253270 (patch)
tree09a497a8a55b7bb0e071dc17db05b53eefe6677e /src/graphic
parent6c1e52274a4842ea1ab24ed6a1fd19c6126597b7 (diff)
downloadmana-client-aa42c03c8a6b10d4fac03143f06811d94a253270.tar.gz
mana-client-aa42c03c8a6b10d4fac03143f06811d94a253270.tar.bz2
mana-client-aa42c03c8a6b10d4fac03143f06811d94a253270.tar.xz
mana-client-aa42c03c8a6b10d4fac03143f06811d94a253270.zip
Solved stats window problem with updating variable and sending stat update.
Diffstat (limited to 'src/graphic')
-rw-r--r--src/graphic/graphic.cpp32
-rw-r--r--src/graphic/graphic.h2
2 files changed, 12 insertions, 22 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp
index 7678506b..1759f72a 100644
--- a/src/graphic/graphic.cpp
+++ b/src/graphic/graphic.cpp
@@ -48,6 +48,7 @@ InventoryWindow *inventoryWindow;
NpcListDialog *npcListDialog;
NpcTextDialog *npcTextDialog;
SkillDialog *skillDialog;
+StatsWindow *statsWindow;
void ChatListener::action(const std::string& eventId)
{
@@ -183,6 +184,10 @@ GraphicEngine::GraphicEngine() {
skillDialog = new SkillDialog();
skillDialog->setVisible(false);
+ statsWindow = new StatsWindow();
+ statsWindow->setVisible(false);
+
+
// Give focus to the chat input
chatInput->requestFocus();
@@ -221,6 +226,7 @@ GraphicEngine::~GraphicEngine() {
delete npcListDialog;
delete npcTextDialog;
delete skillDialog;
+ delete statsWindow;
delete tileset;
delete monsterset;
@@ -252,11 +258,11 @@ void GraphicEngine::refresh() {
if (tile0 < 600) {
tileset->spriteset[tile0]->draw(buffer,
- i * 32 - offset_x, j * 32 - offset_y);
+ i * 32 - offset_x, j * 32 - offset_y);
}
if (tile1 > 0) { //&& tile1 < 600
tileset->spriteset[tile1]->draw(buffer,
- i * 32 - offset_x, j * 32 - offset_y);
+ i * 32 - offset_x, j * 32 - offset_y);
}
}
@@ -460,27 +466,9 @@ void GraphicEngine::refresh() {
chatlog.chat_draw(buffer, 8, font);
- /*
- if (show_skill_dialog) {
- update_skill_dialog();
- }
-
- if (show_skill_list_dialog) {
- if (gui_update(skill_list_player) == 0) {
- int ret = shutdown_dialog(skill_list_player);
- if (ret == 1) {
- if (char_info->skill_point > 0) {
- WFIFOW(0) = net_w_value(0x0112);
- WFIFOW(2) = net_w_value(
- get_skill_id(skill_list_dialog[3].d1));
- WFIFOSET(4);
- }
- } else if(ret == 2) {
- show_skill_list_dialog = false;
- }
- }
+ if (statsWindow->isVisible()) {
+ statsWindow->update();
}
- */
// Update character status display
statusWindow->update();
diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h
index f9a5b4e7..970b09c9 100644
--- a/src/graphic/graphic.h
+++ b/src/graphic/graphic.h
@@ -39,6 +39,7 @@
#include "../gui/inventory.h"
#include "../gui/npc.h"
#include "../gui/status.h"
+#include "../gui/stats.h"
#include "../resources/resourcemanager.h"
#include "spriteset.h"
#include <allegro.h>
@@ -64,6 +65,7 @@ extern InventoryWindow *inventoryWindow;
extern NpcListDialog *npcListDialog;
extern NpcTextDialog *npcTextDialog;
extern SkillDialog *skillDialog;
+extern StatsWindow *statsWindow;
char get_x_offset(char, char);
char get_y_offset(char, char);