diff UICharacter.cpp @ 832:dfd683c4f538

Hotkeys fixed Moved GUIButton.h to GUIWindow.h
author Nomad
date Wed, 27 Mar 2013 19:50:37 +0200
parents 9c3f28b31b4a
children 10fa7dad1391 6daea87a3fe3
line wrap: on
line diff
--- a/UICharacter.cpp	Wed Mar 27 15:04:59 2013 +0200
+++ b/UICharacter.cpp	Wed Mar 27 19:50:37 2013 +0200
@@ -6,7 +6,6 @@
 #include "Game.h"
 #include "GUIWindow.h"
 #include "GUIFont.h"
-#include "GUIButton.h"
 #include "GUIProgressBar.h"
 #include "Party.h"
 #include "AudioPlayer.h"
@@ -3759,9 +3758,9 @@
     v0 = uActiveCharacter;
     dword_507CC0 = uActiveCharacter;
     for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
+    {
+        if ( pButton->msg == UIMSG_InventoryLeftClick )
         {
-        if ( pButton->uControlID == 120 )
-            {
             dword_50698C = pButton->uX;
             dword_506988 = pButton->uY;
             dword_506984 = pButton->uZ;
@@ -3787,7 +3786,7 @@
             v3 = v3 + v4 - 3;
             ++a2;
             ++v12;
-            pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, 0x79u, *v14, 0, "", 0, 0);
+            pGUIWindow_CurrentMenu->CreateButton(0x18u, v3, 0xCCu, v4 - 3, 3, *v14 | 0x8000, UIMSG_SkillUp, *v14, 0, "", 0, 0);
             v2 = pFontLucida;
             }
         ++v14;
@@ -3804,7 +3803,7 @@
                 v6 = LOBYTE(v2->uFontHeight);
                 v5 = v5 + v6 - 3;
                 ++a2;
-                pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, 0x79u, *v15, 0, "", 0, 0);
+                pGUIWindow_CurrentMenu->CreateButton(0x18u, v5, 0xCCu, v6 - 3, 3, *v15 | 0x8000, UIMSG_SkillUp, *v15, 0, "", 0, 0);
                 v2 = pFontLucida;
                 }
             ++v15;
@@ -3821,7 +3820,7 @@
                     v7 = v7 + v8 - 3;
                     ++a2;
                     ++v13;
-                    pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, 0x79u, *v16, 0, "", 0, 0);
+                    pGUIWindow_CurrentMenu->CreateButton(0xF6u, v7, 0xCCu, v8 - 3, 3, *v16 | 0x8000, UIMSG_SkillUp, *v16, 0, "", 0, 0);
                     v2 = pFontLucida;
                     }
                 ++v16;
@@ -3838,7 +3837,7 @@
                         v10 = LOBYTE(v2->uFontHeight);
                         v9 = v9 + v10 - 3;
                         ++a2;
-                        pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, 0x79u, *v17, 0, "", 0, 0);
+                        pGUIWindow_CurrentMenu->CreateButton(0xF6u, v9, 0xCCu, v10 - 3, 3, *v17 | 0x8000, UIMSG_SkillUp, *v17, 0, "", 0, 0);
                         v2 = pFontLucida;
                         }
                     ++v17;