Update applications/chess/AA-ChessBoard.ring - Start at the center of the screen + set the images width/height - Now the game looks more nice on small resolutions
@@ -16,8 +16,7 @@ IgnoreTurnColor = False ### False <<=== Normal turns
###-------------------
### WINDOW SIZE
-moveX = 200 moveY = 100 ### Open Window on Screen Position
-sizeX = 840 sizeY = 820 ### Size of Window
+sizeX = 800 sizeY = 600 ### Size of Window
hSize = 8 +2 +2 ### Size of array, Display -4 smaller
vSize = 8 +2 +2 ### Size of array, Display -4 smaller
@@ -106,6 +105,8 @@ oldV = 0
###-----------------------
+C_ButtonIconWidth = 60
+C_ButtonIconHeight = 60
C_Spacing = 2
C_ButtonFirstStyle = 'border-radius:1px; color:black; background-color: rgb(229,249,203) ;' ### Square pale
###'border-style: outset; border-width: 2px; border-radius: 2px; border-color: gray;'
@@ -160,6 +161,7 @@ Func DrawWidget()
workWidget = new qWidget()
{
+
# Set the Window Icon
setWindowIcon(new qIcon(new qPixmap(KNIGHT)))
@@ -173,7 +175,6 @@ Func DrawWidget()
workHeight = workWidget.height()
fontSize = 8 + (workHeight / 100)
- move(moveX, moveY)
resize(sizeX, sizeY)
@@ -292,6 +293,8 @@ Func DrawWidget()
setClickEvent("UserLeftClick(" + string(Row) +
"," + string(Col) + ")")
setSizePolicy(1,1)
+ setMinimumWidth(70)
+ setMinimumHeight(70)
}
### Widget - Add HORIZONTAL BUTTONS
@@ -344,7 +347,7 @@ Func DrawImage( Piece, Row, Col )
nImageHeight = oPiece.Height() ### Piece, not Square
oPiece = oPiece.scaled(nImageWidth , nImageHeight ,0,0)
setIcon(new qIcon(oPiece))
- setIconSize(new qSize(nImageWidth , nImageHeight ))
+ setIconSize(new qSize(C_ButtonIconWidth , C_ButtonIconHeight ))
}
return
