comparison Shopping.lua @ 61:cf2b6b9a8337 v23

6.2 update, shopping list bug fixes, ui scale option
author yellowfive
date Tue, 23 Jun 2015 00:27:21 -0700
parents 01b63b8ed811
children 0515882856f1
comparison
equal deleted inserted replaced
60:017c05f42fd4 61:cf2b6b9a8337
56 _frameShop:SetWidth(500) 56 _frameShop:SetWidth(500)
57 _frameShop:SetHeight(500) 57 _frameShop:SetHeight(500)
58 _frameShop:SetBorderColor(Amr.Colors.BorderBlue) 58 _frameShop:SetBorderColor(Amr.Colors.BorderBlue)
59 _frameShop:SetBackgroundColor(Amr.Colors.Bg) 59 _frameShop:SetBackgroundColor(Amr.Colors.Bg)
60 60
61 if Amr.db.profile.options.uiScale ~= 1 then
62 local scale = tonumber(Amr.db.profile.options.uiScale)
63 _frameShop:SetScale(scale)
64 end
65
61 local lbl = AceGUI:Create("AmrUiLabel") 66 local lbl = AceGUI:Create("AmrUiLabel")
62 lbl:SetWidth(400) 67 lbl:SetWidth(400)
63 lbl:SetFont(Amr.CreateFont("Bold", 28, Amr.Colors.White)) 68 lbl:SetFont(Amr.CreateFont("Bold", 28, Amr.Colors.White))
64 lbl:SetText(L.ShopTitle) 69 lbl:SetText(L.ShopTitle)
65 lbl:SetWordWrap(false) 70 lbl:SetWordWrap(false)
212 lbl:SetJustifyH("CENTER") 217 lbl:SetJustifyH("CENTER")
213 lbl:SetPoint("TOP", _panelContent.content, "TOP", 0, -30) 218 lbl:SetPoint("TOP", _panelContent.content, "TOP", 0, -30)
214 _panelContent:AddChild(lbl) 219 _panelContent:AddChild(lbl)
215 else 220 else
216 -- set labels on checkboxes 221 -- set labels on checkboxes
217 if data.specs[1] then 222 if data.specs[1] and data.specs[1] ~= 0 then
218 local id, name = GetSpecializationInfoByID(Amr.GetGameSpecId(data.specs[1])) 223 local id, name = GetSpecializationInfoByID(Amr.GetGameSpecId(data.specs[1]))
219 _chk1:SetText(name .. " " .. L.ShopSpecLabel) 224 _chk1:SetText(name .. " " .. L.ShopSpecLabel)
220 _chk1:SetVisible(true) 225 _chk1:SetVisible(true)
221 _chk1:SetChecked(_specs[1]) 226 _chk1:SetChecked(_specs[1])
222 end 227 end
223 228
224 if data.specs[2] then 229 if data.specs[2] and data.specs[2] ~= 0 then
225 local id, name = GetSpecializationInfoByID(Amr.GetGameSpecId(data.specs[2])) 230 local id, name = GetSpecializationInfoByID(Amr.GetGameSpecId(data.specs[2]))
226 _chk2:SetText(name .. " " .. L.ShopSpecLabel) 231 _chk2:SetText(name .. " " .. L.ShopSpecLabel)
227 _chk2:SetVisible(true) 232 _chk2:SetVisible(true)
228 _chk2:SetChecked(_specs[2]) 233 _chk2:SetChecked(_specs[2])
229 end 234 end