diff classes/ReAction_ActionDisplay.lua @ 10:f3a7bfebc283

Version 0.33
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:37:38 +0000
parents 650f75d08952
children
line wrap: on
line diff
--- a/classes/ReAction_ActionDisplay.lua	Tue Mar 20 21:35:57 2007 +0000
+++ b/classes/ReAction_ActionDisplay.lua	Tue Mar 20 21:37:38 2007 +0000
@@ -107,6 +107,13 @@
   -- find where it does) but for some reason we have to here.
   self.frames.cooldown:SetFrameLevel(self.frames.cooldown:GetFrameLevel() + 1)
 
+  -- create a right-click hotkey label
+  local hkr = b:CreateFontString(nil,"ARTWORK","NumberFontNormalSmallGray")
+  hkr:SetWidth(36)
+  hkr:SetHeight(10)
+  hkr:Hide()
+  self.frames.hotkeyright = hkr
+
   b:EnableMouse()
   b:RegisterForDrag("LeftButton", "RightButton")
   b:RegisterForClicks("AnyUp")
@@ -150,7 +157,7 @@
     if not f then
       -- create the actionID label
       f = self.frames.button:CreateFontString(nil,"ARTWORK","NumberFontNormalSmall")
-      f:SetPoint("BOTTOMLEFT")
+      f:SetPoint("CENTER")
       f:SetTextColor( tcolor(actionIDColor) )
       self.frames.actionID = f
     end
@@ -161,8 +168,13 @@
   end
 end
 
-function RAAD:DisplayHotkey(txt)
-  self.frames.hotkey:SetText(string.upper(txt or ""))
+function RAAD:DisplayHotkey(txt,button)
+  button = button or "LeftButton"
+  if button == "LeftButton" then
+    self.frames.hotkey:SetText(string.upper(txt or ""))
+  elseif button == "RightButton" then
+    self.frames.hotkeyright:SetText(string.upper(txt or ""))
+  end
   self:UpdateUsable()
 end
 
@@ -171,6 +183,7 @@
   f.icon:SetVertexColor(          self:GetIconColor(isUsable, notEnoughMana, outOfRange) )
   f.button:GetNormalTexture():SetVertexColor( self:GetBorderColor(isUsable, notEnoughMana, outOfRange) )
   f.hotkey:SetTextColor(          self:GetHotkeyColor(isUsable, notEnoughMana, outOfRange, f.hotkey:GetText()) )
+  f.hotkeyright:SetTextColor(     self:GetHotkeyColor(isUsable, notEnoughMana, outOfRange, f.hotkeyright:GetText()) )
 
   local o 
   if isUsable then
@@ -349,6 +362,10 @@
     placeLabel(f.hotkey, self.config.keyBindLoc)
   end
 
+  if self.config.keyBindRightLoc then
+    placeLabel(f.hotkeyright, self.config.keyBindRightLoc)
+  end
+
   if self.config.stackCountLoc then
     placeLabel(f.count, self.config.stackCountLoc)
   end
@@ -359,6 +376,12 @@
     f.hotkey:Hide()
   end
     
+  if self.config.showKeyBindRight then
+    f.hotkeyright:Show()
+  else
+    f.hotkeyright:Hide()
+  end
+    
   if self.config.showStackCount then
     f.count:Show()
   else
@@ -377,6 +400,7 @@
   local f = self.frames
   -- for now, just a static style
   f.hotkey:SetFontObject(NumberFontNormal)
+  f.hotkeyright:SetFontObject(NumberFontNormalSmall)
   f.count:SetFontObject(NumberFontNormalYellow)
   f.border:SetVertexColor( tcolor(equippedActionBorderColor) )
 end