1
0

feat: make gui?

This commit is contained in:
2026-06-04 19:53:41 +08:00
parent af2d264346
commit 5e652a3207
20 changed files with 836 additions and 2 deletions
@@ -0,0 +1,85 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Effects
import QtQuick.Shapes
import Qt.labs.qmlmodels
import InventoryWars
ApplicationWindow {
height: 480
title: "Inventory Wars"
visible: true
width: 640
ListModel {
id: rounds
ListElement {
name: "Round 1"
mode: GameService.GameScoring.FirstGuess
item_id: 100
item_name: "Item 1"
item_image: ""
clue: "Clue 1"
}
ListElement {
name: "Round 2"
mode: GameService.GameScoring.FirstGuess
item_id: 100
item_name: "Item 2"
item_image: ""
clue: "Clue 2"
}
ListElement {
name: "Round 3"
mode: GameService.GameScoring.FirstGuess
item_id: 100
item_name: "Item 3"
item_image: ""
clue: "Clue 3"
}
ListElement {
name: "Round 4"
mode: GameService.GameScoring.FirstGuess
item_id: 100
item_name: "Item 4"
item_image: ""
clue: "Clue 4"
}
}
IdleView {
id: idleView
anchors.fill: parent
rounds: rounds
selectedRound: rounds.get(0)
onRoundSelected: {
idleView.visible = false
ongoingView.start()
ongoingView.visible = true
}
}
OngoingView {
id: ongoingView
anchors.fill: parent
visible: false
round: idleView.selectedRound
gameService: gameService
onClose: {
idleView.visible = true
ongoingView.visible = false
}
}
GameService {
id: gameService
}
}