Mercurial > wow > askmrrobot
comparison ui/Ui.lua @ 133:a0894ffebd15 v62
Bug fixes and tweaks for 8.0.
author | yellowfive |
---|---|
date | Wed, 25 Jul 2018 12:17:24 -0700 |
parents | e31b02b24488 |
children | 57be71eccc0a |
comparison
equal
deleted
inserted
replaced
132:2279d58793c6 | 133:a0894ffebd15 |
---|---|
45 Amr.Colors.Classes = {} | 45 Amr.Colors.Classes = {} |
46 for k,v in pairs(RAID_CLASS_COLORS) do | 46 for k,v in pairs(RAID_CLASS_COLORS) do |
47 Amr.Colors.Classes[k] = { R = v.r, G = v.g, B = v.b } | 47 Amr.Colors.Classes[k] = { R = v.r, G = v.g, B = v.b } |
48 end | 48 end |
49 | 49 |
50 -- get colors for item qualities from WoW's constants | |
51 Amr.Colors.Qualities = {} | |
52 for k,v in pairs(ITEM_QUALITY_COLORS) do | |
53 Amr.Colors.Qualities[k] = { R = v.r, G = v.g, B = v.b } | |
54 end | |
55 | |
50 -- helper to take 0-1 value and turn into 2-digit hex value | 56 -- helper to take 0-1 value and turn into 2-digit hex value |
51 local function decToHex(num) | 57 local function decToHex(num) |
52 num = math.ceil(num * 255) | 58 num = math.ceil(num * 255) |
53 num = string.format("%X", num) | 59 num = string.format("%X", num) |
54 if string.len(num) == 1 then num = "0" .. num end | 60 if string.len(num) == 1 then num = "0" .. num end |
169 -- some status text | 175 -- some status text |
170 local lblStatus = AceGUI:Create("AmrUiLabel") | 176 local lblStatus = AceGUI:Create("AmrUiLabel") |
171 f:AddChild(lblStatus) | 177 f:AddChild(lblStatus) |
172 lblStatus:SetWidth(900) | 178 lblStatus:SetWidth(900) |
173 lblStatus:SetFont(Amr.CreateFont("Italic", 12, Amr.Colors.TextTan)) | 179 lblStatus:SetFont(Amr.CreateFont("Italic", 12, Amr.Colors.TextTan)) |
174 lblStatus:SetText("Ask Mr. Robot " .. L.MainStatusText("v" .. GetAddOnMetadata(Amr.ADDON_NAME, "Version"), "https://www.askmrrobot.com/wow/addon")) | 180 lblStatus:SetText("Ask Mr. Robot " .. L.MainStatusText("v" .. GetAddOnMetadata(Amr.ADDON_NAME, "Version"), "https://www.askmrrobot.com/addon")) |
175 lblStatus:SetJustifyH("CENTER") | 181 lblStatus:SetJustifyH("CENTER") |
176 lblStatus:SetWordWrap(false) | 182 lblStatus:SetWordWrap(false) |
177 lblStatus:SetPoint("TOP", f.content, "BOTTOM") | 183 lblStatus:SetPoint("TOP", f.content, "BOTTOM") |
178 | 184 |
179 -- create the main UI container | 185 -- create the main UI container |