mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Remove menu button
This commit is contained in:
@@ -44,7 +44,7 @@ public class FDeckChooser extends FScreen {
|
||||
private FPref stateSetting = null;
|
||||
|
||||
public FDeckChooser(boolean isAi0) {
|
||||
super(true, "", false);
|
||||
super(true, "");
|
||||
isAi = isAi0;
|
||||
|
||||
lstDecks.setItemActivateHandler(new FEventHandler() {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class FDeckViewer extends FScreen {
|
||||
}
|
||||
|
||||
private FDeckViewer(Deck deck0) {
|
||||
super(true, deck0.getName(), false);
|
||||
super(true, deck0.getName());
|
||||
deck = deck0;
|
||||
cardManager = new CardManager(false);
|
||||
cardManager.setPool(deck.getMain());
|
||||
|
||||
@@ -7,7 +7,6 @@ import forge.Forge;
|
||||
import forge.Forge.Graphics;
|
||||
import forge.assets.FImage;
|
||||
import forge.assets.FSkinColor;
|
||||
import forge.assets.FSkinImage;
|
||||
import forge.assets.FSkinColor.Colors;
|
||||
import forge.assets.FSkinTexture;
|
||||
import forge.toolbox.FContainer;
|
||||
@@ -24,9 +23,9 @@ public abstract class FScreen extends FContainer {
|
||||
|
||||
public static final float HEADER_HEIGHT = Math.round(Utils.AVG_FINGER_HEIGHT * 0.8f);
|
||||
|
||||
private final FLabel btnBack, lblHeader, btnMenu;
|
||||
private final FLabel btnBack, lblHeader;
|
||||
|
||||
protected FScreen(boolean showBackButton, String headerCaption, boolean showMenuButton) {
|
||||
protected FScreen(boolean showBackButton, String headerCaption) {
|
||||
if (showBackButton) {
|
||||
btnBack = add(new FLabel.Builder().icon(new BackIcon()).pressedColor(HEADER_BTN_PRESSED_COLOR).align(HAlignment.CENTER).command(new FEventHandler() {
|
||||
@Override
|
||||
@@ -44,17 +43,6 @@ public abstract class FScreen extends FContainer {
|
||||
else {
|
||||
lblHeader = null;
|
||||
}
|
||||
if (showMenuButton) {
|
||||
btnMenu = add(new FLabel.Builder().icon(FSkinImage.FAVICON).pressedColor(HEADER_BTN_PRESSED_COLOR).align(HAlignment.CENTER).command(new FEventHandler() {
|
||||
@Override
|
||||
public void handleEvent(FEvent e) {
|
||||
showMenu();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
else {
|
||||
btnMenu = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getHeaderCaption() {
|
||||
@@ -94,9 +82,6 @@ public abstract class FScreen extends FContainer {
|
||||
if (btnBack != null) {
|
||||
btnBack.setBounds(0, 0, HEADER_HEIGHT, HEADER_HEIGHT);
|
||||
}
|
||||
if (btnMenu != null) {
|
||||
btnMenu.setBounds(width - HEADER_HEIGHT, 0, HEADER_HEIGHT, HEADER_HEIGHT);
|
||||
}
|
||||
if (lblHeader != null) {
|
||||
lblHeader.setBounds(headerX, 0, headerWidth, HEADER_HEIGHT);
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ public abstract class LaunchScreen extends FScreen {
|
||||
private boolean creatingMatch;
|
||||
|
||||
public LaunchScreen(String headerCaption) {
|
||||
super(true, headerCaption, true);
|
||||
super(true, headerCaption);
|
||||
btnStart = add(new StartButton());
|
||||
}
|
||||
|
||||
|
||||
@@ -853,7 +853,7 @@ public class ConstructedScreen extends LaunchScreen {
|
||||
private int selectedIndex;
|
||||
|
||||
private DeckList() {
|
||||
super(true, "", false);
|
||||
super(true, "");
|
||||
list = new FList<Object>();
|
||||
}
|
||||
|
||||
@@ -1003,7 +1003,7 @@ public class ConstructedScreen extends LaunchScreen {
|
||||
private final FList<Variant> lstVariants = add(new FList<Variant>());
|
||||
|
||||
private MultiVariantSelect() {
|
||||
super(true, "Select Variants", false);
|
||||
super(true, "Select Variants");
|
||||
|
||||
lstVariants.setListItemRenderer(new VariantRenderer());
|
||||
lstVariants.addItem(new Variant(GameType.Vanguard, "Each player has a special \"Avatar\" card that affects the game."));
|
||||
|
||||
@@ -23,7 +23,7 @@ public class HomeScreen extends FScreen {
|
||||
private final ArrayList<FButton> buttons = new ArrayList<FButton>();
|
||||
|
||||
public HomeScreen() {
|
||||
super(false, null, false);
|
||||
super(false, null);
|
||||
|
||||
addButton("Constructed", new FEventHandler() {
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class MatchScreen extends FScreen {
|
||||
private VPlayerPanel bottomPlayerPanel, topPlayerPanel;
|
||||
|
||||
public MatchScreen(Game game, LobbyPlayer localPlayer, List<VPlayerPanel> playerPanels0) {
|
||||
super(false, null, false); //match screen has custom header
|
||||
super(false, null); //match screen has custom header
|
||||
|
||||
for (VPlayerPanel playerPanel : playerPanels0) {
|
||||
playerPanels.put(playerPanel.getPlayer(), add(playerPanel));
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SettingsScreen extends FScreen {
|
||||
private final FGroupList<Setting> lstSettings = add(new FGroupList<Setting>());
|
||||
|
||||
public SettingsScreen() {
|
||||
super(true, "Settings", false);
|
||||
super(true, "Settings");
|
||||
lstSettings.setListItemRenderer(new SettingRenderer());
|
||||
|
||||
lstSettings.addGroup("General Settings");
|
||||
@@ -144,6 +144,11 @@ public class SettingsScreen extends FScreen {
|
||||
5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showMenu() {
|
||||
//No menu to show from this screen
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doLayout(float startY, float width, float height) {
|
||||
lstSettings.setBounds(0, startY, width, height - startY);
|
||||
@@ -232,7 +237,7 @@ public class SettingsScreen extends FScreen {
|
||||
private final String currentValue = FModel.getPreferences().getPref(pref);
|
||||
|
||||
private CustomSelectScreen() {
|
||||
super(true, "Select " + label.substring(0, label.length() - 1), false);
|
||||
super(true, "Select " + label.substring(0, label.length() - 1));
|
||||
lstOptions = add(new FList<String>(options));
|
||||
lstOptions.setListItemRenderer(new FList.DefaultListItemRenderer<String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user