Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
f7963e71
Commit
f7963e71
authored
Nov 10, 2010
by
Max-Wilhelm Bruker
Browse files
hide horizontal hand of non-local players
parent
a67883ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/player.cpp
View file @
f7963e71
...
@@ -313,8 +313,12 @@ void Player::rearrangeZones()
...
@@ -313,8 +313,12 @@ void Player::rearrangeZones()
if
(
settingsCache
->
getHorizontalHand
())
{
if
(
settingsCache
->
getHorizontalHand
())
{
if
(
mirrored
)
{
if
(
mirrored
)
{
hand
->
setPos
(
base
);
if
(
hand
->
contentsKnown
())
{
base
+=
QPointF
(
0
,
hand
->
boundingRect
().
height
());
hand
->
setVisible
(
true
);
hand
->
setPos
(
base
);
base
+=
QPointF
(
0
,
hand
->
boundingRect
().
height
());
}
else
hand
->
setVisible
(
false
);
stack
->
setPos
(
base
);
stack
->
setPos
(
base
);
base
+=
QPointF
(
stack
->
boundingRect
().
width
(),
0
);
base
+=
QPointF
(
stack
->
boundingRect
().
width
(),
0
);
...
@@ -326,10 +330,16 @@ void Player::rearrangeZones()
...
@@ -326,10 +330,16 @@ void Player::rearrangeZones()
table
->
setPos
(
base
.
x
()
+
stack
->
boundingRect
().
width
(),
0
);
table
->
setPos
(
base
.
x
()
+
stack
->
boundingRect
().
width
(),
0
);
base
+=
QPointF
(
0
,
table
->
boundingRect
().
height
());
base
+=
QPointF
(
0
,
table
->
boundingRect
().
height
());
hand
->
setPos
(
base
);
if
(
hand
->
contentsKnown
())
{
hand
->
setVisible
(
true
);
hand
->
setPos
(
base
);
}
else
hand
->
setVisible
(
false
);
}
}
hand
->
setWidth
(
table
->
getWidth
()
+
stack
->
boundingRect
().
width
());
hand
->
setWidth
(
table
->
getWidth
()
+
stack
->
boundingRect
().
width
());
}
else
{
}
else
{
hand
->
setVisible
(
true
);
hand
->
setPos
(
base
);
hand
->
setPos
(
base
);
base
+=
QPointF
(
hand
->
boundingRect
().
width
(),
0
);
base
+=
QPointF
(
hand
->
boundingRect
().
width
(),
0
);
...
@@ -358,9 +368,10 @@ void Player::updateBoundingRect()
...
@@ -358,9 +368,10 @@ void Player::updateBoundingRect()
{
{
prepareGeometryChange
();
prepareGeometryChange
();
qreal
width
=
CARD_HEIGHT
+
5
+
counterAreaWidth
+
stack
->
boundingRect
().
width
();
qreal
width
=
CARD_HEIGHT
+
5
+
counterAreaWidth
+
stack
->
boundingRect
().
width
();
if
(
settingsCache
->
getHorizontalHand
())
if
(
settingsCache
->
getHorizontalHand
())
{
bRect
=
QRectF
(
0
,
0
,
width
+
table
->
boundingRect
().
width
(),
table
->
boundingRect
().
height
()
+
hand
->
boundingRect
().
height
());
qreal
handHeight
=
hand
->
isVisible
()
?
hand
->
boundingRect
().
height
()
:
0
;
else
bRect
=
QRectF
(
0
,
0
,
width
+
table
->
boundingRect
().
width
(),
table
->
boundingRect
().
height
()
+
handHeight
);
}
else
bRect
=
QRectF
(
0
,
0
,
width
+
hand
->
boundingRect
().
width
()
+
table
->
boundingRect
().
width
(),
table
->
boundingRect
().
height
());
bRect
=
QRectF
(
0
,
0
,
width
+
hand
->
boundingRect
().
width
()
+
table
->
boundingRect
().
width
(),
table
->
boundingRect
().
height
());
emit
sizeChanged
();
emit
sizeChanged
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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