Back to Home

ESO Lua File v101044

ingame/housetours/keyboard/housetours_dialogs_keyboard.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
59
60
61
62
63
---- Favorite / Recommend Dialog
ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard = ZO_HouseTours_FavoriteRecommendHouseDialog_Shared:Subclass()
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:Initialize(dialogName, control)
    self.divider = control:GetNamedChild("Divider")
    self.favoriteContainer = control:GetNamedChild("Favorite")
    self.favoriteLabel = self.favoriteContainer:GetNamedChild("Text")
    self.favoriteCheckbox = self.favoriteContainer:GetNamedChild("ContainerCheckbox")
    self.recommendContainer = control:GetNamedChild("Recommend")
    self.recommendLabel = self.recommendContainer:GetNamedChild("Text")
    self.recommendCheckbox = self.recommendContainer:GetNamedChild("ContainerCheckbox")
    ZO_HouseTours_FavoriteRecommendHouseDialog_Shared.Initialize(self, dialogName, control)
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:SetupDialog()
    ZO_HouseTours_FavoriteRecommendHouseDialog_Shared.SetupDialog(self)
    ZO_CheckButton_SetLabelText(self.favoriteCheckbox, GetString(SI_HOUSE_TOURS_VISITOR_DIALOG_FAVORITE_OPTION_TEXT))
    ZO_CheckButton_SetLabelText(self.recommendCheckbox, GetString(SI_HOUSE_TOURS_VISITOR_DIALOG_RECOMMEND_OPTION_TEXT))
    local showRecommendOption = self:IsRecommendOptionVisible()
    self.recommendContainer:SetHidden(not showRecommendOption)
    self.favoriteContainer:ClearAnchors()
    if showRecommendOption then
        self.favoriteContainer:SetAnchor(TOP, self.recommendContainer, BOTTOM, 0, 10)
    else
        self.favoriteContainer:SetAnchor(TOP, self.divider, BOTTOM, 0, 20)
    end
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:RefreshMainText()
    self.favoriteLabel:SetText(self:GetFavoritesText())
    self.recommendLabel:SetText(self:GetRecommendationsText())
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:Show(...)
    HousingEditorRequestModeChange(HOUSING_EDITOR_MODE_DISABLED)
    return ZO_HouseTours_FavoriteRecommendHouseDialog_Shared.Show(self, ...)
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:OnFavoriteChecked(control, checked)
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:OnRecommendChecked(control, checked)
end
function ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard.OnControlInitialized(control)
    HOUSE_TOURS_FAVORITE_RECOMMEND_HOUSE_DIALOG_KEYBOARD = ZO_HouseTours_FavoriteRecommendHouseDialog_Keyboard:New("HOUSE_TOURS_FAVORITE_RECOMMEND_HOUSE", control)
end