DeathBoardClient = DeathBoardClient or {} DeathBoardClient.Constants = {} DeathBoardClient.Constants.Protocol = DeathBoardClient.Protocol or require("Codex\\DeathBoard\\Managers\\Protocol") DeathBoardClient.Constants.Window = { WindowID = 122, Width = 380, Height = 251, ButtonOpenW = 17, ButtonOpenH = 17, ButtonOpenX = 80, ButtonOpenY = 20 } DeathBoardClient.Constants.Images = { BACKGROUND = 28700, BTN_OPEN = 28701, BTN_CLOSE = 28702, BTN_PAGE_NEXT = 28703, BTN_PAGE_PREV = 28704, TITLE_BAR = 28705, CLASS_BK = 28706, CLASS_DL = 28707, CLASS_ELF = 28708, CLASS_MG = 28709, CLASS_RF = 28710, CLASS_SM = 28711, CLASS_SU = 28712, BG_INFO = 28713, KILL_ICON = 28714, GUILD_PLACEHOLDER = 28715, CLASS_BK_TGA = 28716, CLASS_DL_TGA = 28717, CLASS_ELF_TGA = 28718, CLASS_MG_TGA = 28719, CLASS_RF_TGA = 28720, CLASS_SM_TGA = 28721, CLASS_SU_TGA = 28722, HUD_KILL_TGA = 28723 } DeathBoardClient.Constants.UV = { Background = { U = 0.0, V = 0.0, UW = (591 / 1024.0), VH = (390 / 512.0) }, ButtonOpen = { Normal = { U = 0.0, V = 0.0, UW = (54 / 64.0), VH = (54 / 256.0) }, Hover = { U = 0.0, V = (54 / 256.0), UW = (54 / 64.0), VH = (54 / 256.0) }, Pressed = { U = 0.0, V = (108 / 256.0), UW = (54 / 64.0), VH = (54 / 256.0) }, Disabled= { U = 0.0, V = 0.0, UW = (54 / 64.0), VH = (54 / 256.0) } }, ButtonClose = { Normal = { U = 0.008, V = 0.002, UW = 0.83, VH = 0.20 }, Hover = { U = 0.008, V = 0.213, UW = 0.83, VH = 0.20 }, Pressed = { U = 0.008, V = 0.429, UW = 0.83, VH = 0.20 }, Disabled= { U = 0.008, V = 0.002, UW = 0.83, VH = 0.20 } }, ButtonPage = { Normal = { U = 0.0, V = 0.000000, UW = 0.84375, VH = 0.2109375 }, Hover = { U = 0.0, V = 0.2109375, UW = 0.84375, VH = 0.2109375 }, Pressed = { U = 0.0, V = 0.421875, UW = 0.84375, VH = 0.2109375 }, Disabled= { U = 0.0, V = 0.000000, UW = 0.84375, VH = 0.2109375 } }, TitleBar = { U = 0.0, V = 0.0, UW = (668 / 1024.0), VH = (44 / 64.0) }, BgInfo = { U = 0.0, V = 0.0, UW = (191 / 256.0), VH = (44 / 64.0) }, KillIcon = { U = 0.0, V = 0.0, UW = (600 / 1024.0), VH = (600 / 1024.0) }, HUDKill = { U = 0.0, V = 0.0, UW = (300 / 512.0), VH = (74 / 128.0) }, ClassIcon = { U = 0.0, V = 0.0, UW = (67 / 128.0), VH = (67 / 128.0) }, HUDClassIcon = { U = 0.0, V = 0.0, UW = (72 / 128.0), VH = (72 / 128.0) } } DeathBoardClient.Constants.Layout = { WindowY = 50, TitleOffsetY = 17, TitleBar = { Width = 346, Height = 23, YOffset = 41, InnerWidth = 314 }, Row = { Height = 18, GapTopFromTitleBar = 2, GapBetweenRows = 7, HoverExtraHeight = 2, HoverOffsetY = -1 }, Icons = { ClassSize = 14, KillSize = 14, Gap = 2 }, Columns = { Count = 5, Titles = { "KILLER", "VICTIM", "CLASS", "TIME", "MAP" }, TitleOffsetY = 8, TitleXOffsetFirst = -2, TitleXOffsetLast = 2 }, Separators = { Height = 10, Width = 0.5, Alpha = 0.7 }, Pagination = { ButtonSize = 17, Spacing = 40, BottomOffset = 15 }, CloseButton = { Width = 16, Height = 16, MarginX = 11, MarginY = 11 } } DeathBoardClient.Constants.Colors = { TitleGold = { 255, 215, 0, 255 }, HeaderGold = { 237, 214, 161, 255 }, KillerOrange = { 255, 128, 0, 255 } } function DeathBoardClient.Constants.GetTrueWidth() local resolutions = { [0] = GetWideX() ~= 640 and 627 or 640, [1] = GetWideX() ~= 640 and 640 or 640, [2] = GetWideX() ~= 640 and 640 or 640, [3] = GetWideX() ~= 640 and 640 or 640, [4] = GetWideX() ~= 640 and 854 or 640, [5] = GetWideX() ~= 640 and 854 or 640, [6] = GetWideX() ~= 640 and 854 or 640, [7] = GetWideX() ~= 640 and 854 or 640, [8] = GetWideX() ~= 640 and 854 or 640 } return resolutions[GetMainResolution()] end function DeathBoardClient.Constants.GetTrueHeight() if GetOpenGLHeight then local h = GetOpenGLHeight() if h and h > 0 then return h end end if WindowGetHeight then local hh = WindowGetHeight() if hh and hh > 0 then return hh end end return 480 end function DeathBoardClient.Constants.GetCenterX(width, offset) offset = offset or 0 local screenW = DeathBoardClient.Constants.GetTrueWidth() return (screenW / 2) - (width / 2) + offset end function DeathBoardClient.Constants.GetCenterY(height, offset) offset = offset or 0 local screenH = DeathBoardClient.Constants.GetTrueHeight() return (screenH / 2) - (height / 2) + offset end