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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
-- Name edit
local sendButtonState , sendButtonStateLocked = BSTATE_NORMAL , false
if result ~= GIFT_ACTION_RESULT_SUCCESS then
sendButtonState , sendButtonStateLocked = BSTATE_DISABLED , true
if result ~= GIFT_ACTION_RESULT_RECIPIENT_EMPTY then
end
end
if errorText then
else
end
end
end )
ZO_AutoComplete : New ( nameEdit , { AUTO_COMPLETE_FLAG_FRIEND , AUTO_COMPLETE_FLAG_GUILD } , nil , AUTO_COMPLETION_ONLINE_OR_OFFLINE , 5 , AUTO_COMPLETION_AUTOMATIC_MODE )
-- Note edit
randomNoteButton : SetText ( zo_iconFormat ( "EsoUI/Art/Market/Keyboard/giftMessageIcon_up.dds" , "100%" , "100%" ) )
end )
{
title =
{
} ,
end
end ,
canQueue = true ,
buttons =
{
-- Cancel Button
{
end ,
} ,
-- Send Button
{
-- We lose this giftId's data after a successful send, so we need to store this marketProductId for later
local sendingData =
{
marketProductId = marketProductId ,
recipientDisplayName = recipientDisplayName ,
}
end ,
} ,
} ,
end ,
end
} )
EVENT_MANAGER : RegisterForEvent ( "ZoConfirmSendGiftKeyboard" , EVENT_CONFIRM_SEND_GIFT , function ( eventCode , giftId )
end
end )
end
local LOADING_DELAY_MS = 500
local SHOW_LOADING_ICON = true
local HIDE_LOADING_ICON = false
local GIFTING_STATE_DELAY = 1
local GIFTING_STATE_WAITING = 2
local GIFTING_STATE_RESULT = 3
local timeInMilliseconds = currentTimeInSeconds * 1000
end
if result == GIFT_ACTION_RESULT_SUCCESS then
if stackCount > 1 then
mainText = zo_strformat ( SI_GIFT_SENT_TEXT_WITH_QUANTITY , itemName , stackCount , ZO_SELECTED_TEXT : Colorize ( data . recipientDisplayName ) )
else
mainText = zo_strformat ( SI_GIFT_SENT_TEXT , itemName , ZO_SELECTED_TEXT : Colorize ( data . recipientDisplayName ) )
end
else
end
local confirmText
else
end
ZO_Dialogs_SetDialogLoadingIcon ( dialog : GetNamedChild ( "Loading" ) , dialog : GetNamedChild ( "Text" ) , HIDE_LOADING_ICON )
elseif data . currentState == GIFTING_STATE_DELAY and timeInMilliseconds > data . loadingDelayTimeMS then
-- Only present the waiting state after a fixed delay, to avoid very short transitions between waiting and result
ZO_Dialogs_UpdateDialogMainText ( dialog , { text = zo_strformat ( SI_GIFT_SENDING_TEXT , data . itemName ) , TEXT_ALIGN_CENTER } )
ZO_Dialogs_SetDialogLoadingIcon ( dialog : GetNamedChild ( "Loading" ) , dialog : GetNamedChild ( "Text" ) , SHOW_LOADING_ICON )
end
end
EVENT_MANAGER : UnregisterForEvent ( "ZO_GiftSendingDialog_Keyboard_OnGiftActionResult" , EVENT_GIFT_ACTION_RESULT )
end
end
EVENT_MANAGER : RegisterForEvent ( "ZO_GiftSendingDialog_Keyboard_OnGiftActionResult" , EVENT_GIFT_ACTION_RESULT , function ( eventId , ... ) OnGiftActionResult ( data , ... ) end )
end
{
title =
{
} ,
{
align = TEXT_ALIGN_CENTER ,
} ,
canQueue = true ,
mustChoose = true ,
modal = false ,
buttons =
{
{
return
end
end ,
} ,
} ,
}
)
end |