mirror of
https://github.com/QuasarApp/Hanoi-Towers.git
synced 2025-05-13 09:59:34 +00:00
added load screan for first show
This commit is contained in:
parent
0343b05d56
commit
138e26e5dc
@ -5,7 +5,6 @@ import QtQuick.Layouts 1.15
|
||||
|
||||
QtAndroidAdMobInterstitial {
|
||||
id: interstitial
|
||||
|
||||
unitId: "ca-app-pub-5799112356811682/5211864198"
|
||||
nonPersonalizedAds: false
|
||||
|
||||
@ -18,7 +17,7 @@ QtAndroidAdMobInterstitial {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
timer.start()
|
||||
load()
|
||||
}
|
||||
|
||||
onLoadError: {
|
||||
|
@ -33,6 +33,17 @@
|
||||
* Copyright (C) 2019-2021 QuasarApp-Gruppe.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Config</name>
|
||||
<message>
|
||||
|
@ -34,6 +34,17 @@
|
||||
* Copyright (C) 2019-2021 QuasarApp group.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BackEnd</name>
|
||||
<message>
|
||||
|
@ -34,6 +34,17 @@
|
||||
* Copyright (C) 2019-2021 Grupo QuasarApp.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Config</name>
|
||||
<message>
|
||||
|
@ -34,6 +34,17 @@
|
||||
* Copyright (C) 2019-2021 Groupe QuasarApp.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Config</name>
|
||||
<message>
|
||||
|
@ -48,6 +48,17 @@
|
||||
* Copyright(C)2018-2019 Yankovich N. Andrei。 {3 ?} {2018-2019 ?}</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BackEnd</name>
|
||||
<message>
|
||||
|
@ -34,6 +34,17 @@
|
||||
* Prawa autorskie (C) 2019-2021 grupa QuasarApp.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Config</name>
|
||||
<message>
|
||||
|
@ -48,6 +48,17 @@
|
||||
* Copyright (C) 2018-2019 Янкович А. Н.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BackEnd</name>
|
||||
<message>
|
||||
|
@ -48,6 +48,17 @@
|
||||
* Telif Hakkı (C) 2018-2019 Yankovich N. Andrei.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BackEnd</name>
|
||||
<message>
|
||||
|
@ -50,6 +50,17 @@
|
||||
* Авторське право (C) 2018-2019 Янкович Н. Андрій.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BackEnd</name>
|
||||
<message>
|
||||
|
@ -34,6 +34,17 @@
|
||||
* 版权所有 (C) 2019-2021 QuasarApp group 。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AdLoadScrean</name>
|
||||
<message>
|
||||
<source>Load ads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Sorry, but we need to show you an ad. We want to eat too 😇</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Config</name>
|
||||
<message>
|
||||
|
@ -36,10 +36,24 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
function hideLoad() {
|
||||
loadAdScrean.visible = false
|
||||
}
|
||||
|
||||
function hideerrLoad(errorID) {
|
||||
loadAdScrean.visible = false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
const obj = createAdBobObjects("qrc:/admod/AdMobInterstitialAndroid.qml", this);
|
||||
if (obj) {
|
||||
admodbanner = obj;
|
||||
|
||||
loadAdScrean.visible = true;
|
||||
|
||||
admodbanner.loadError.connect(hideerrLoad)
|
||||
admodbanner.loaded.connect(hideLoad)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -173,5 +187,8 @@ ApplicationWindow {
|
||||
Menu.PremiumLoader {
|
||||
}
|
||||
|
||||
|
||||
Menu.AdLoadScrean {
|
||||
id: loadAdScrean
|
||||
visible: false
|
||||
}
|
||||
}
|
||||
|
69
HanoiTowers/client/menu/AdLoadScrean.qml
Normal file
69
HanoiTowers/client/menu/AdLoadScrean.qml
Normal file
@ -0,0 +1,69 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
||||
Dialog {
|
||||
id: loadDialog
|
||||
x: (gameWindow.width / 2 - width / 2)
|
||||
y: (gameWindow.height / 2 - height / 2)
|
||||
|
||||
width: gameWindow.width * 0.5
|
||||
height: gameWindow.height * 0.5
|
||||
modal : true
|
||||
|
||||
background: Rectangle {
|
||||
id: background
|
||||
property int colorIndex: 0
|
||||
property var colors: ["#ffffff",
|
||||
"#00aaff",
|
||||
"#00ffaa",
|
||||
"#ffaa00"]
|
||||
color: colors[colorIndex % colors.length]
|
||||
|
||||
Behavior on color {
|
||||
|
||||
ColorAnimation {
|
||||
duration: timer.interval
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
timer.start()
|
||||
colorIndex ++
|
||||
|
||||
}
|
||||
Timer {
|
||||
id: timer
|
||||
interval: 5000
|
||||
repeat: true
|
||||
running: false
|
||||
onTriggered: {
|
||||
parent.colorIndex++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
BusyIndicator {
|
||||
Layout.fillWidth: true
|
||||
|
||||
running: true
|
||||
}
|
||||
|
||||
Label {
|
||||
id: textContainer
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: qsTr("Loading ...");
|
||||
font.bold: true
|
||||
font.pointSize: loadDialog.height * 0.06
|
||||
|
||||
verticalAlignment: Qt.AlignTop
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
|
||||
}
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
closePolicy: Popup.NoAutoClose
|
||||
}
|
@ -26,6 +26,7 @@
|
||||
<file>menu/Premium.qml</file>
|
||||
<file>menu/PremiumThanks.qml</file>
|
||||
<file>menu/PremiumLoader.qml</file>
|
||||
<file>menu/AdLoadScrean.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/textures">
|
||||
<file>res/fogBack.png</file>
|
||||
|
Loading…
x
Reference in New Issue
Block a user