Back to Home

ESO Lua File v100016

pregame/accountlogin/keyboard/zo_loginbase.lua

[◄ back to folders ]
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
-- Constants for screens that are derived from the LoginBase
ZO_LOGIN_EDITBOX_WIDTH = 500
-- Login Base screen --
ZO_LoginBase_Keyboard = ZO_Object:Subclass()
local DMM_LOGIN_LOGO_DATA = {
    leftSideTexturePath = "EsoUI/Art/Login/jp_login_logo_left.dds",
    leftSideWidth = 512,
    rightSideTexturePath = "EsoUI/Art/Login/jp_login_logo_right.dds",
    rightSideWidth = 256,
    height = 256,       -- Left and right logos share the same height
}
function ZO_LoginBase_Keyboard:New(...)
    local object = ZO_Object.New(self)
    object:Initialize(...)
    return object
end
function ZO_LoginBase_Keyboard:Initialize(control)
    self.control = control
    self.bgMunge = control:GetNamedChild("BGMunge")
    self.esoLogo = control:GetNamedChild("ESOLogo")
    self.esoLogoRightSide = self.esoLogo:GetNamedChild("Right")
    self:UpdateEsoLogo()
    self:ResizeControls()
end
function ZO_LoginBase_Keyboard:ResizeControls()
end
function ZO_LoginBase_Keyboard:UpdateEsoLogo()
    if not self.logoUpdated then
        -- Update the logo based on the service currently being used, if necessary
        local logoData
        local serviceType = GetPlatformServiceType()
        
        if serviceType == PLATFORM_SERVICE_TYPE_DMM then
            logoData = DMM_LOGIN_LOGO_DATA
        end
        if logoData then
            self.esoLogo:SetTexture(logoData.leftSideTexturePath)
            self.esoLogo:SetDimensions(logoData.leftSideWidth, logoData.height)
            
            self.esoLogoRightSide:SetTexture(logoData.rightSideTexturePath)
            self.esoLogoRightSide:SetDimensions(logoData.rightSideWidth, logoData.height)
        end
        self.logoUpdated = true
    end
end