1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
ZO_FOCUS_BIDIRECTIONAL = true
local BASE_FOCUS_NAME = "basefocus"
return group
end
self . cancelCallback = cancelCallback -- this is an active thing, players choose to cancel. this is not called upon focus deactivation
end
return true
end
end
end
end
return focus . focusedControl
end
end
focus . focusedControl = nil
end
end
if ( bidirectional == ZO_FOCUS_BIDIRECTIONAL ) then
end
end
end
-- For now, focus is always a ZO_Focus object
end
end
-- hack: since we're trying to make gamepad and keyboard play nicely, this will always deactivate focus group, even if it was started
-- with keyboard...but the activation only happens if the user initiates focus groups with the gamepad.
-- gotta come up with the concept of having both a focused FOCUS object and a focused control and maintaining
-- what gets focused when changing a direction when you're at the edge of a focus group (stack based? purely direction based?
-- dynamically linking as groups are activated and deactivated?
end
end
local currentFocus = focus . focusedControl
if ( currentFocus ) then
local nextFocus = focus . controls [ currentFocus ] [ direction ]
-- if it's hidden, you're at the edge of this focus group, don't move anywhere
end
end
end
if ( focusControl ) then
-- local handler = focusControl:GetHandler("OnClicked") or focusControl:GetHandler("OnMouseUp") -- using OnClicked takes different arguments; this should be made more robust.
end
end
end
end
end
|