Commit b07b7b0b authored by Georgiy Yankovskiy's avatar Georgiy Yankovskiy

Game icon component: rectangle -> button replacement

parent f1562ea5
...@@ -80,9 +80,9 @@ Rectangle { ...@@ -80,9 +80,9 @@ Rectangle {
model: core_app.games model: core_app.games
Game { Game {
title: model.name gameTitle: model.name
exec: model.exec gameExec: model.exec
icon: model.icon gameIcon: model.icon
width: 256 width: 256
height: 256 height: 256
...@@ -151,3 +151,9 @@ Rectangle { ...@@ -151,3 +151,9 @@ Rectangle {
} }
/*##^##
Designer {
D{i:0}D{i:1;invisible:true}
}
##^##*/
import QtQuick import QtQuick
import "../constants/scene.js" as SceneConstants import "../constants/scene.js" as SceneConstants
import "../components/" as C
Rectangle { C.Button {
property string title: "Generic title" property string gameTitle: "Generic title"
property string icon: "" property string gameIcon: ""
property string exec: "" property string gameExec: ""
id: game id: game
width: 256 width: 256
height: 256 height: 256
color: "#efefef" implicitWidth: 256
radius: 5 implicitHeight: 256
border.width: 1 text: ""
// color: "#efefef"
MouseArea { //radius: 5
anchors.fill: parent // border.width: 1
onClicked: function(){ onClicked: function(){
// console.log(game.title); // console.log(game.title);
gameInfoScene.title = game.title; gameInfoScene.title = game.gameTitle;
gameInfoScene.icon = game.icon; gameInfoScene.icon = game.gameIcon;
gameInfoScene.exec = game.exec; gameInfoScene.exec = game.gameExec;
window.scene = SceneConstants.gameInfoScene; window.scene = SceneConstants.gameInfoScene;
} }
}
Image { Image {
id: image id: image
...@@ -32,7 +32,7 @@ Rectangle { ...@@ -32,7 +32,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
source: game.icon source: game.gameIcon
anchors.rightMargin: 8 anchors.rightMargin: 8
anchors.bottomMargin: 47 anchors.bottomMargin: 47
anchors.leftMargin: 8 anchors.leftMargin: 8
...@@ -44,7 +44,7 @@ Rectangle { ...@@ -44,7 +44,7 @@ Rectangle {
id: title id: title
y: 439 y: 439
height: 33 height: 33
text: game.title text: game.gameTitle
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment