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
b608d810
Commit
b608d810
authored
Jan 29, 2015
by
Zach H
Browse files
Merge branch 'fix-deck-shuffle-check'
parents
a8fcd9ec
d0f4d96d
Changes
3
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/settingscache.cpp
View file @
b608d810
...
...
@@ -49,7 +49,6 @@ SettingsCache::SettingsCache()
zoneViewSortByName
=
settings
->
value
(
"zoneview/sortbyname"
,
true
).
toBool
();
zoneViewSortByType
=
settings
->
value
(
"zoneview/sortbytype"
,
true
).
toBool
();
zoneViewPileView
=
settings
->
value
(
"zoneview/pileview"
,
true
).
toBool
();
zoneViewShuffle
=
settings
->
value
(
"zoneview/shuffle"
,
true
).
toBool
();
soundEnabled
=
settings
->
value
(
"sound/enabled"
,
false
).
toBool
();
soundPath
=
settings
->
value
(
"sound/path"
).
toString
();
...
...
@@ -261,11 +260,6 @@ void SettingsCache::setZoneViewPileView(int _zoneViewPileView){
settings
->
setValue
(
"zoneview/pileview"
,
zoneViewPileView
);
}
void
SettingsCache
::
setZoneViewShuffle
(
int
_zoneViewShuffle
)
{
zoneViewShuffle
=
_zoneViewShuffle
;
settings
->
setValue
(
"zoneview/shuffle"
,
zoneViewShuffle
);
}
void
SettingsCache
::
setSoundEnabled
(
int
_soundEnabled
)
{
soundEnabled
=
_soundEnabled
;
...
...
cockatrice/src/settingscache.h
View file @
b608d810
...
...
@@ -57,7 +57,7 @@ private:
int
minPlayersForMultiColumnLayout
;
bool
tapAnimation
;
bool
chatMention
;
bool
zoneViewSortByName
,
zoneViewSortByType
,
zoneViewPileView
,
zoneViewShuffle
;
bool
zoneViewSortByName
,
zoneViewSortByType
,
zoneViewPileView
;
bool
soundEnabled
;
QString
soundPath
;
bool
priceTagFeature
;
...
...
@@ -103,11 +103,6 @@ public:
@return zoneViewPileView if the view should be sorted into pile view.
*/
bool
getZoneViewPileView
()
const
{
return
zoneViewPileView
;
}
/**
Returns if the view should be shuffled on closing.
@return zoneViewShuffle if the view should be shuffled on closing.
*/
bool
getZoneViewShuffle
()
const
{
return
zoneViewShuffle
;
}
bool
getSoundEnabled
()
const
{
return
soundEnabled
;
}
QString
getSoundPath
()
const
{
return
soundPath
;
}
bool
getPriceTagFeature
()
const
{
return
priceTagFeature
;
}
...
...
@@ -149,7 +144,6 @@ public slots:
void
setZoneViewSortByName
(
int
_zoneViewSortByName
);
void
setZoneViewSortByType
(
int
_zoneViewSortByType
);
void
setZoneViewPileView
(
int
_zoneViewPileView
);
void
setZoneViewShuffle
(
int
_zoneViewShuffle
);
void
setSoundEnabled
(
int
_soundEnabled
);
void
setSoundPath
(
const
QString
&
_soundPath
);
void
setPriceTagFeature
(
int
_priceTagFeature
);
...
...
cockatrice/src/zoneviewwidget.cpp
View file @
b608d810
...
...
@@ -101,7 +101,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberC
}
if
(
_origZone
->
getIsShufflable
()
&&
(
numberCards
==
-
1
))
{
shuffleCheckBox
.
setChecked
(
settingsCache
->
getZoneViewShuffle
()
);
shuffleCheckBox
.
setChecked
(
true
);
QGraphicsProxyWidget
*
shuffleProxy
=
new
QGraphicsProxyWidget
;
shuffleProxy
->
setWidget
(
&
shuffleCheckBox
);
vbox
->
addItem
(
shuffleProxy
);
...
...
@@ -225,10 +225,8 @@ void ZoneViewWidget::closeEvent(QCloseEvent *event)
cmd
.
set_zone_name
(
zone
->
getName
().
toStdString
());
player
->
sendGameCommand
(
cmd
);
}
if
(
shuffleCheckBox
.
isChecked
())
if
(
shuffleCheckBox
.
isChecked
())
player
->
sendGameCommand
(
Command_Shuffle
());
if
(
canBeShuffled
)
settingsCache
->
setZoneViewShuffle
(
shuffleCheckBox
.
isChecked
());
emit
closePressed
(
this
);
deleteLater
();
event
->
accept
();
...
...
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