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 |
--
--[[ Market Content Fragment ]] --
--
return fragment
end
if not entryControl . marketProduct then
entryControl . marketProduct = ZO_MarketProductIndividual : New ( entryControl , self . marketProductIconPool , owner )
end
end
if not entryControl . marketProduct then
entryControl . marketProduct = ZO_MarketProductBundle : New ( entryControl , self . marketProductIconPool , owner )
end
end
end
local HIDE_CALLBACK = nil
local CENTER_ENTRIES = true
local HEADER_HEIGHT = 50
local ROW_PADDING = 10
self . productGridList : AddEntryTemplate ( "ZO_MarketProduct_Keyboard" , ZO_MARKET_PRODUCT_WIDTH , ZO_MARKET_PRODUCT_HEIGHT , MarketProductEntrySetup , HIDE_CALLBACK , MarketProductEntryReset , ZO_MARKET_PRODUCT_COLUMN_PADDING , ROW_PADDING , CENTER_ENTRIES )
self . productGridList : AddEntryTemplate ( "ZO_MarketProductBundle_Keyboard" , ZO_MARKET_PRODUCT_BUNDLE_WIDTH , ZO_MARKET_PRODUCT_HEIGHT , MarketProductBundleEntrySetup , HIDE_CALLBACK , MarketProductEntryReset , ZO_MARKET_PRODUCT_COLUMN_PADDING , ROW_PADDING , CENTER_ENTRIES )
self . productGridList : AddHeaderTemplate ( "ZO_Market_GroupLabel" , HEADER_HEIGHT , ZO_DefaultGridHeaderSetup )
end
if newState == SCENE_FRAGMENT_HIDDEN then
end
end
self . contentHeader : SetText ( zo_strformat ( SI_MARKET_PRODUCT_NAME_FORMATTER , marketProductData : GetDisplayName ( ) ) )
local marketCurrencyType , cost , costAfterDiscount , discountPercent , esoPlusCost = marketProductData : GetMarketProductPricingByPresentation ( )
local currencyString = zo_strformat ( SI_NUMBER_FORMAT , ZO_Currency_FormatKeyboard ( ZO_Currency_MarketCurrencyToUICurrency ( marketCurrencyType ) , costAfterDiscount , ZO_CURRENCY_FORMAT_AMOUNT_ICON ) )
if numChildren > 0 then
for childIndex = 1 , numChildren do
local childProductData = ZO_MarketProductData : New ( childMarketProductId , ZO_INVALID_PRESENTATION_INDEX )
local templateName = isBundle and "ZO_MarketProductBundle_Keyboard" or "ZO_MarketProduct_Keyboard"
local productInfo =
{
templateName = templateName ,
productData = childProductData ,
parentMarketProductId = parentMarketProductId ,
gridHeaderTemplate = "ZO_Market_GroupLabel" ,
-- for sorting
isBundle = isBundle ,
}
end
end )
end
end
end
local ALL_ENTRIES = nil
end
end
end
end
else
return false
end
end
else
return false
end
end |