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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
end
--These are anchored here because they use pixel offsets instead of UI unit offsets to get exact 2-pixel borders
local previewInitialTextureSizing = PIXEL_UNITS : Add ( self . previewInitialTexture , PIXEL_SOURCE_PIXELS )
--Make it resize to fit after all of its children get anchored
local valueSliderBackgroundTextureSizing = PIXEL_UNITS : Add ( valueSliderBackgroundTexture , PIXEL_SOURCE_PIXELS )
local alphaSliderBackgroundTextureSizing = PIXEL_UNITS : Add ( alphaSliderBackgroundTexture , PIXEL_SOURCE_PIXELS )
-- Handle action bind switching
end
end
local SHOW_UNBOUND = true
local DEFAULT_GAMEPAD_ACTION_NAME = nil
ZO_Keybindings_RegisterLabelForBindingUpdate ( self . valueSliderKeyboardUp , "UI_SHORTCUT_RIGHT_STICK_UP" , SHOW_UNBOUND , DEFAULT_GAMEPAD_ACTION_NAME , OnInputChanged )
ZO_Keybindings_RegisterLabelForBindingUpdate ( self . valueSliderKeyboardDown , "UI_SHORTCUT_RIGHT_STICK_DOWN" )
-- We only need to register one of the above with OnInputChanged because one call of that function does everything we need.
-- The color picker displays hard-coded arrow keys to match screen narration, rather than being based on any rebindable action.
end
{
title =
{
} ,
gamepadInfo =
{
dialogType = GAMEPAD_DIALOGS . CUSTOM ,
allowShowOnNextScene = true ,
dontEndInWorldInteractions = true ,
} ,
canQueue = true ,
blockDialogReleaseOnPress = true ,
blockDirectionalInput = true ,
local narrationData = { }
--Get the narration data for navigating the color wheel
local colorNarrationData =
{
--The gamepad keybind for choosing color isn't a real keybind so just use the key that gives us the narration we want here
keybindName = ZO_Keybindings_GetNarrationStringFromKeys ( KEY_GAMEPAD_LEFT_STICK , KEY_INVALID , KEY_INVALID , KEY_INVALID , KEY_INVALID ) ,
}
--Get the narration data for the saturation slider
local saturationNarrationData =
{
--The gamepad keybind for choosing saturation isn't a real keybind so just use the key that gives us the narration we want here
keybindName = ZO_Keybindings_GetNarrationStringFromKeys ( KEY_GAMEPAD_RIGHT_STICK , KEY_INVALID , KEY_INVALID , KEY_INVALID , KEY_INVALID ) ,
}
else
--Get the narration data for navigating the color wheel
local NO_NAME = nil
ZO_CombineNumericallyIndexedTables ( narrationData , ZO_GetCombinedDirectionalInputNarrationData ( NO_NAME , NO_NAME , NO_NAME , GetString ( SI_SCREEN_NARRATION_COLOR_PICKER_CHANGE_COLOR_NARRATION ) ) )
--Get the narration data for the saturation slider
local saturationUpNarrationData =
{
keybindName = ZO_Keybindings_GetHighestPriorityNarrationStringFromAction ( "UI_SHORTCUT_RIGHT_STICK_UP" ) or GetString ( SI_ACTION_IS_NOT_BOUND ) ,
}
local saturationDownNarrationData =
{
keybindName = ZO_Keybindings_GetHighestPriorityNarrationStringFromAction ( "UI_SHORTCUT_RIGHT_STICK_DOWN" ) or GetString ( SI_ACTION_IS_NOT_BOUND ) ,
}
end
return narrationData
end ,
buttons =
{
[ 1 ] =
{
} ,
[ 2 ] =
{
} ,
}
} )
end
self . colorSelectNormalizedX , self . colorSelectNormalizedY = self . colorSelect : GetThumbNormalizedPosition ( )
end
end
end
do
local COLOR_SELECT_SPEED = 1.4
local VALUE_SPEED = 1
local radiusSq = self . colorSelectNormalizedX * self . colorSelectNormalizedX + self . colorSelectNormalizedY * self . colorSelectNormalizedY
if radiusSq > 1 then
end
self . colorSelect : SetThumbNormalizedPosition ( self . colorSelectNormalizedX , self . colorSelectNormalizedY )
end
end
end
end
--[[ XML Handlers ]] --
end |