View Single Post
03/31/15, 04:11 PM   #7
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Oh yeah, my bad. I guess by the time I got done looking at it I forgot you said all of that.

EDIT: Oh yeah, and the reason the buttons stop working when you turn on SetKeyboardEnabled(true) is because if, for example, the chat edit box (to enter chat) had focus & its keyboardEnabled...if it did not block keybind buttons you would start walking & opening all kinds of windows as you typed and those dialog buttons are not keyboardEnabled controls they are called/fired from keybinds.

Here you go:

Lua Code:
  1. local DIALOG_PRIMARY
  2. local DIALOG_NEGATIVE
  3.  
  4.  
  5. local function FCOGuildBankQuickSelect_Player_Activated(...)
  6. ...
  7.      -- Grabs the key for the binding string name (e, alt, whatever)
  8.     DIALOG_PRIMARY = ZO_Keybindings_GetBindingStringFromAction("DIALOG_PRIMARY")
  9.     DIALOG_NEGATIVE = ZO_Keybindings_GetBindingStringFromAction("DIALOG_NEGATIVE")
  10. ...
  11. end
  12.  
  13.  
  14. local function FCOGuildBankQuickSelect_HandleKeyboardEvents(self, key, hide)
  15. ...
  16.     -- Convert keycode to actual key so we can compare it to our primary/negative keys
  17.     elseif GetKeyName(key) == DIALOG_PRIMARY then
  18.         ZO_Dialogs_ButtonKeybindPressed("DIALOG_PRIMARY")
  19.     elseif GetKeyName(key) == DIALOG_NEGATIVE then
  20.         ZO_Dialogs_ButtonKeybindPressed("DIALOG_NEGATIVE")
  21.     end
  22.     return false
  23. end

One thing you may (or may not) have thought of (I didn't look at any of the other code) (although unlikely) do you have to worry about if they have changed those primary/negative keybinds to a keypress you are using to switch guilds (KEY_1, KEY_NUMPAD1, exc..)?

PS: I like the easy way of switching guild banks...How about adding scrollWheel support to just scroll the mouse wheel to switch guilds.

Last edited by circonian : 03/31/15 at 04:23 PM.
  Reply With Quote