Back to Home

ESO Lua File v100032

pregame/scenes/pregamefragments.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
64
65
66
67
68
69
70
71
72
73
74
75
-----------------------------
--Movie Background Fragment
-----------------------------
ZO_MovieBackgroundFragment = ZO_SceneFragment:Subclass()
function ZO_MovieBackgroundFragment:New(...)
    return ZO_SceneFragment.New(self, ...)
end
function ZO_MovieBackgroundFragment:Initialize(movieFile)
    ZO_SceneFragment.Initialize(self)
    self.movieFile = movieFile
end
function ZO_MovieBackgroundFragment:Show()
    local PLAY_IMMEDIATELY = true
    local PLAY_IN_BACKGROUND = true
    local LOOP = true
    PlayVideo(self.movieFile, PLAY_IMMEDIATELY, VIDEO_SKIP_MODE_NO_SKIP, nil, PLAY_IN_BACKGROUND, LOOP)
    self:OnShown()
end
function ZO_MovieBackgroundFragment:Hide()
    self:OnHidden()
end
ZO_MutedMovieBackgroundFragment = ZO_MovieBackgroundFragment:Subclass()
function ZO_MutedMovieBackgroundFragment:Show()
    local PLAY_IMMEDIATELY = true
    local PLAY_IN_BACKGROUND = true
    local LOOP = true
    local MUTE = true
    PlayVideo(self.movieFile, PLAY_IMMEDIATELY, VIDEO_SKIP_MODE_NO_SKIP, nil, PLAY_IN_BACKGROUND, LOOP, MUTE)
    self:OnShown()
end
----------------------------------------
--Pregame Scene State Advance From Fragment
----------------------------------------
ZO_PregameSceneStateAdvanceFromFragment = ZO_SceneFragment:Subclass()
function ZO_PregameSceneStateAdvanceFromFragment:New(...)
    return ZO_SceneFragment.New(self, ...)
end
function ZO_PregameSceneStateAdvanceFromFragment:Initialize(state)
    ZO_SceneFragment.Initialize(self)
    self:SetHideOnSceneHidden(true)
    self.advanceFromState = state
end
function ZO_PregameSceneStateAdvanceFromFragment:Show()
    self:OnShown()
end
function ZO_PregameSceneStateAdvanceFromFragment:Hide()
    --Advancing can often change scenes causing fragments to refresh and this Hide be re-run. So protect the advance until the previous advance completes.
    --also only advance if we are in an expected state
    if not self.advancing then
        self.advancing = true
        PregameStateManager_AdvanceStateFromState(self.advanceFromState)
        self:OnHidden()
    end
    self.advancing = nil
end
PREGAME_GAMMA_ADJUST_INTRO_ADVANCE_FRAGMENT = ZO_PregameSceneStateAdvanceFromFragment:New("GammaAdjust")
SCREEN_ADJUST_ACTION_LAYER_FRAGMENT = ZO_ActionLayerFragment:New("ScreenAdjustActions")
PREGAME_SCREEN_ADJUST_INTRO_ADVANCE_FRAGMENT = ZO_PregameSceneStateAdvanceFromFragment:New("ScreenAdjustIntro")