Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ingame
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
ingame
Commits
7456e9a5
Commit
7456e9a5
authored
May 13, 2024
by
Exc404
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Кнопка Play + LB, RB кнопки
parent
bc7d82d8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
30 deletions
+90
-30
Tabs.qml
qml/components/Tabs.qml
+0
-0
TextButton.qml
qml/components/TextButton.qml
+1
-1
GameInfoScene.qml
qml/scenes/GameInfoScene.qml
+89
-29
No files found.
qml/components/Tabs.qml
View file @
7456e9a5
This diff is collapsed.
Click to expand it.
qml/components/TextButton.qml
View file @
7456e9a5
...
@@ -19,7 +19,7 @@ C.Button {
...
@@ -19,7 +19,7 @@ C.Button {
font.family
:
globalFont
.
font
font.family
:
globalFont
.
font
font.weight
:
400
font.weight
:
400
font.styleName
:
globalFont
.
font
.
styleName
font.styleName
:
globalFont
.
font
.
styleName
font.pointSize
:
1
4
font.pointSize
:
1
6
//font.bold : true
//font.bold : true
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
...
...
qml/scenes/GameInfoScene.qml
View file @
7456e9a5
...
@@ -31,9 +31,6 @@ Rectangle {
...
@@ -31,9 +31,6 @@ Rectangle {
gameRect
.
anchors
.
left
=
startPos
.
left
gameRect
.
anchors
.
left
=
startPos
.
left
gameRect
.
anchors
.
top
=
startPos
.
top
gameRect
.
anchors
.
top
=
startPos
.
top
runGameButton
.
focus
=
true
runGameButton
.
focus
=
true
// gameRect.width = startPos.Layout.preferredWidth
// gameRect.Height = startPos.Layout.preferredHeight
root
.
state
=
"completed"
root
.
state
=
"completed"
}
}
states
:[
states
:[
...
@@ -67,7 +64,6 @@ Rectangle {
...
@@ -67,7 +64,6 @@ Rectangle {
]
]
transitions
:
Transition
{
transitions
:
Transition
{
// smoothly reanchor myRect and move into new position
AnchorAnimation
{
duration
:
300
}
AnchorAnimation
{
duration
:
300
}
}
}
...
@@ -190,8 +186,8 @@ Rectangle {
...
@@ -190,8 +186,8 @@ Rectangle {
anchors.top
:
gameRect
.
parent
.
top
anchors.top
:
gameRect
.
parent
.
top
anchors.leftMargin
:
root
.
width
/
100
*
3
anchors.leftMargin
:
root
.
width
/
100
*
3
anchors.topMargin
:
root
.
width
/
100
*
3
anchors.topMargin
:
root
.
width
/
100
*
3
width
:
root
.
width
/
100
*
20
width
:
height
/
3
*
2
//
root.width / 100 * 20
height
:
width
/
2
*
3
height
:
root
.
height
/
2
//
width / 2 * 3
color
:
"#00000000"
color
:
"#00000000"
}
}
...
@@ -226,13 +222,9 @@ Rectangle {
...
@@ -226,13 +222,9 @@ Rectangle {
RowLayout
{
RowLayout
{
id
:
info
id
:
info
width
:
parent
.
width
-
finishPos
.
width
-
root
.
width
/
100
*
6
width
:
parent
.
width
-
finishPos
.
width
-
root
.
width
/
100
*
6
//height: content.height - topPanel.height
anchors.left
:
finishPos
.
right
anchors.left
:
finishPos
.
right
anchors.top
:
finishPos
.
top
anchors.top
:
finishPos
.
top
anchors.leftMargin
:
root
.
width
/
100
*
3
anchors.leftMargin
:
root
.
width
/
100
*
3
ColumnLayout
{
ColumnLayout
{
Layout.alignment
:
Qt
.
AlignLeft
|
Qt
.
AlignTop
Layout.alignment
:
Qt
.
AlignLeft
|
Qt
.
AlignTop
Layout.fillWidth
:
true
Layout.fillWidth
:
true
...
@@ -240,45 +232,119 @@ Rectangle {
...
@@ -240,45 +232,119 @@ Rectangle {
spacing
:
40
spacing
:
40
Text
{
Text
{
id
:
title
id
:
title
//width: root.width / 100 * 10
Layout.maximumWidth
:
root
.
width
/
100
*
30
Layout.maximumWidth
:
root
.
width
/
100
*
30
font.weight
:
600
font.weight
:
600
wrapMode
:
Text
.
Wrap
wrapMode
:
Text
.
Wrap
text
:
root
.
title
text
:
root
.
title
//font.pixelSize: 32
font.pixelSize
:
Math
.
max
(
19
,
root
.
height
/
100
*
4.2
)
font.pixelSize
:
Math
.
max
(
19
,
root
.
height
/
100
*
4.2
)
color
:
"white"
color
:
"white"
}
}
Button
{
Button
{
id
:
runGameButton
id
:
runGameButton
text
:
"Run game"
focus
:
true
focus
:
true
//background.opacity: 0.2
leftPadding
:
textGame
.
font
.
pixelSize
*
3
rightPadding
:
leftPadding
topPadding
:
leftPadding
/
8
bottomPadding
:
leftPadding
/
8
//opacity: 0.8
text
:
"Play"
width
:
textGame
.
contentWidth
+
5
hoverEnabled
:
true
contentItem
:
Text
{
id
:
textGame
text
:
runGameButton
.
text
font.pixelSize
:
Math
.
max
(
19
,
root
.
height
/
100
*
3
)
font.family
:
globalFont
.
font
font.weight
:
800
font.styleName
:
globalFont
.
font
.
styleName
color
:
'white'
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
}
padding
:
10
background
:
Rectangle
{
id
:
runGameBg
color
:
"white"
//control.down ? "#aaaaaa" : (control.activeFocus ? "#aaaaaa" : "#000000")
opacity
:
0.1
radius
:
runGameButton
.
width
*
0.3
}
onClicked
:
function
(){
onClicked
:
function
(){
if
(
window
.
scene
!==
S
.
gameInfoScene
)
return
;
if
(
window
.
scene
!==
S
.
gameInfoScene
)
return
;
if
(
core_app
===
undefined
)
return
;
if
(
core_app
===
undefined
)
return
;
core_app
.
start_game
(
root
.
exec
);
core_app
.
start_game
(
root
.
exec
);
}
}
// Состояния
states
:
[
// Карточка в фокуске
State
{
name
:
"focus"
;
when
:
runGameButton
.
activeFocus
PropertyChanges
{
target
:
runGameBg
;
opacity
:
1
;
}
PropertyChanges
{
target
:
textGame
;
font.weight
:
800
;
color
:
"black"
}
},
// На карточку навели курсор мыши
State
{
name
:
"hover"
;
when
:
runGameButton
.
hovered
PropertyChanges
{
target
:
runGameBg
;
opacity
:
1
;
}
PropertyChanges
{
target
:
textGame
;
color
:
"black"
}
}
]
// Анимации при изменениях состояний
transitions
:
Transition
{
reversible
:
true
NumberAnimation
{
property
:
"opacity"
;
duration
:
300
}
}
}
}
}
}
Text
{
//anchors.top: info.top
// anchors.right: info.right
horizontalAlignment
:
Text
.
AlignJustif
Layout.alignment
:
Qt
.
AlignRight
|
Qt
.
AlignTop
//Layout.preferredWidth:
Text
{
horizontalAlignment
:
Text
.
AlignJustif
Layout.alignment
:
Qt
.
AlignRight
|
Qt
.
AlignTop
id
:
title2
id
:
title2
//width: root.width / 100 * 10
Layout.maximumWidth
:
root
.
width
/
100
*
30
Layout.maximumWidth
:
root
.
width
/
100
*
30
Layout.maximumHeight
:
root
.
height
/
100
*
70
Layout.maximumHeight
:
root
.
height
/
100
*
70
elide
:
Text
.
ElideRight
elide
:
Text
.
ElideRight
wrapMode
:
Text
.
Wrap
wrapMode
:
Text
.
Wrap
text
:
"SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfvSD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfvSD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv "
text
:
"SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfvSD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfvSD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv SD ferwf f wqefewf wekj fn wfaksljf dskvjblds vdfkjvb dvlkdfsj vd vjdfk vkldfjv dfkl vd vfkjlbdf kdfljb fkdjn kdjf vd kdfjv vdfkvjdv dfvjkf vdfv "
font.pixelSize
:
Math
.
max
(
13
,
root
.
height
/
100
*
2.2
)
font.pixelSize
:
Math
.
max
(
13
,
root
.
height
/
100
*
2.2
)
...
@@ -287,14 +353,8 @@ Rectangle {
...
@@ -287,14 +353,8 @@ Rectangle {
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment