mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Add Hot Seat Mode setting for mobile game
Prevent crash when rendering card without display area set yet
This commit is contained in:
@@ -125,7 +125,7 @@ public class MatchController implements IMatchController {
|
||||
|
||||
@Override
|
||||
public boolean hotSeatMode() {
|
||||
return false; //TODO: Support toggling hot seat mode
|
||||
return FModel.getPreferences().getPrefBoolean(FPref.MATCH_HOT_SEAT_MODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -332,7 +332,8 @@ public abstract class VCardDisplayArea extends VDisplayArea {
|
||||
|
||||
@Override
|
||||
public void draw(Graphics g) {
|
||||
if (displayArea.rotateCards180) {
|
||||
boolean rotate = displayArea != null && displayArea.rotateCards180;
|
||||
if (rotate) {
|
||||
float padding = getPadding();
|
||||
float x = padding;
|
||||
float y = padding;
|
||||
@@ -344,7 +345,7 @@ public abstract class VCardDisplayArea extends VDisplayArea {
|
||||
g.startRotateTransform(x + w / 2, y + h / 2, 180);
|
||||
}
|
||||
super.draw(g);
|
||||
if (displayArea.rotateCards180) {
|
||||
if (rotate) {
|
||||
g.endTransform();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
"Match Ante Rarity",
|
||||
"Attempts to make antes the same rarity for all players."),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.MATCH_HOT_SEAT_MODE,
|
||||
"Hot Seat Mode",
|
||||
"When starting a game with 2 human players, use single prompt to control both players."),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_UPLOAD_DRAFT,
|
||||
"Upload Draft Picks",
|
||||
"Sends draft picks to Forge servers for analysis, to improve draft AI."),
|
||||
|
||||
@@ -67,21 +67,22 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
|
||||
UI_ENABLE_MUSIC ("true"),
|
||||
UI_ALT_SOUND_SYSTEM ("false"),
|
||||
UI_CURRENT_AI_PROFILE (AiProfileUtil.AI_PROFILE_RANDOM_MATCH),
|
||||
UI_CLONE_MODE_SOURCE ("false"), /** */
|
||||
UI_CLONE_MODE_SOURCE ("false"),
|
||||
UI_MATCH_IMAGE_VISIBLE ("true"),
|
||||
UI_THEMED_COMBOBOX ("true"), // Now applies to all theme settings, not just Combo.
|
||||
UI_THEMED_COMBOBOX ("true"), // Now applies to all theme settings, not just Combo.
|
||||
UI_LOCK_TITLE_BAR ("false"),
|
||||
UI_HIDE_GAME_TABS ("false"), // Visibility of tabs in match screen.
|
||||
UI_HIDE_GAME_TABS ("false"), // Visibility of tabs in match screen.
|
||||
UI_CLOSE_ACTION ("NONE"),
|
||||
UI_MANA_LOST_PROMPT ("false"), // Prompt on losing mana when passing priority
|
||||
UI_MANA_LOST_PROMPT ("false"), // Prompt on losing mana when passing priority
|
||||
|
||||
UI_FOR_TOUCHSCREN("false"),
|
||||
|
||||
UI_VIBRATE_ON_LIFE_LOSS("true"),
|
||||
UI_VIBRATE_ON_LONG_PRESS("true"),
|
||||
|
||||
UI_LANGUAGE("en-US"),
|
||||
|
||||
UI_LANGUAGE("en-US"),
|
||||
|
||||
MATCH_HOT_SEAT_MODE("false"), //this only applies to mobile game
|
||||
MATCHPREF_PROMPT_FREE_BLOCKS("false"),
|
||||
|
||||
SUBMENU_CURRENTMENU ("CONSTRUCTED"),
|
||||
|
||||
Reference in New Issue
Block a user