-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.qml
More file actions
61 lines (48 loc) · 1.58 KB
/
theme.qml
File metadata and controls
61 lines (48 loc) · 1.58 KB
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
import QtQuick 2.0
import QtMultimedia 5.15
import "components"
FocusScope {
id: root
property int currentCollectionIndex: 0
property var currentCollection: api.collections.get(currentCollectionIndex)
property var currentGame: currentCollection.games.get(gameList.HorizontalListcurrentIndex)
property string state: 'consoles'
ConsolesList{
id: consolesList
focus: (root.state === 'consoles')
opacity: focus
visible: opacity
}
LaunchingConsole{
id: launchingConsole
focus: (root.state === 'launching_console')
opacity: focus
visible: opacity
}
HorizontalList{
id: gameList
focus: (root.state === 'games')
opacity: focus
visible: opacity
}
// todo: move sounds to components
onStateChanged:{
if (state === 'consoles')
{
ambiantMusic.stop()
}
else if (state === 'games')
{
ambiantMusic.play()
}
}
// sounds
SoundEffect{
id:nextGameSfx
source: "assets/sounds/effects/next/" + currentCollection.shortName + ".wav" ?? ""
}
SoundEffect{
id: nextConsoleSfx
source: "assets/sounds/effects/next/consoles.wav"
}
}