mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Co-authored-by: TandEm <tandem@users.noreply.github.com>
This commit is contained in:
parent
85e4d4d420
commit
571eb69890
4 changed files with 51 additions and 38 deletions
|
|
@ -114,7 +114,7 @@
|
||||||
panelCardArea.setOpaque(false);
|
panelCardArea.setOpaque(false);
|
||||||
cardArea.setOpaque(false);
|
cardArea.setOpaque(false);
|
||||||
panelCardArea.getViewport().setOpaque(false);
|
panelCardArea.getViewport().setOpaque(false);
|
||||||
panelControl.setBackground(new Color(250, 250, 250, 150));
|
panelControl.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor());
|
||||||
panelControl.setOpaque(true);
|
panelControl.setOpaque(true);
|
||||||
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
|
cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -857,7 +857,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
||||||
|
|
||||||
JPanel toolbar = new JPanel(new BorderLayout());
|
JPanel toolbar = new JPanel(new BorderLayout());
|
||||||
JPanel toolbarInner = new JPanel();
|
JPanel toolbarInner = new JPanel();
|
||||||
toolbar.setBackground(new Color(250, 250, 250, 150));
|
toolbar.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor());
|
||||||
toolbar.setOpaque(true);
|
toolbar.setOpaque(true);
|
||||||
toolbarInner.setOpaque(false);
|
toolbarInner.setOpaque(false);
|
||||||
toolbarInner.add(deckNameAndCountLabel);
|
toolbarInner.add(deckNameAndCountLabel);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import mage.cards.repository.*;
|
||||||
import mage.client.MageFrame;
|
import mage.client.MageFrame;
|
||||||
import mage.client.cards.*;
|
import mage.client.cards.*;
|
||||||
import mage.client.constants.Constants.SortBy;
|
import mage.client.constants.Constants.SortBy;
|
||||||
|
import mage.client.dialog.PreferencesDialog;
|
||||||
import mage.client.deckeditor.table.TableModel;
|
import mage.client.deckeditor.table.TableModel;
|
||||||
import mage.client.dialog.CheckBoxList;
|
import mage.client.dialog.CheckBoxList;
|
||||||
import mage.client.util.GUISizeHelper;
|
import mage.client.util.GUISizeHelper;
|
||||||
|
|
@ -97,11 +98,11 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
||||||
jTextFieldSearch.addActionListener(searchAction);
|
jTextFieldSearch.addActionListener(searchAction);
|
||||||
|
|
||||||
// make the components more readable
|
// make the components more readable
|
||||||
tbColor.setBackground(new Color(250, 250, 250, 150));
|
tbColor.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor());
|
||||||
tbColor.setOpaque(true); // false = transparent
|
tbColor.setOpaque(true); // false = transparent
|
||||||
tbTypes.setBackground(new Color(250, 250, 250, 150));
|
tbTypes.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor());
|
||||||
tbTypes.setOpaque(true); // false = transparent
|
tbTypes.setOpaque(true); // false = transparent
|
||||||
cardSelectorBottomPanel.setBackground(new Color(250, 250, 250, 150));
|
cardSelectorBottomPanel.setBackground(PreferencesDialog.getCurrentTheme().getDeckEditorToolbarBackgroundColor());
|
||||||
cardSelectorBottomPanel.setOpaque(true); // false = transparent
|
cardSelectorBottomPanel.setOpaque(true); // false = transparent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@ import java.awt.*;
|
||||||
*/
|
*/
|
||||||
public enum ThemeType {
|
public enum ThemeType {
|
||||||
// https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html
|
// https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html
|
||||||
DEFAULT("Default",
|
DEFAULT("Default", // name
|
||||||
"",
|
"", // path
|
||||||
true,
|
true, // hasBackground
|
||||||
false,
|
false, // hasLoginBackground
|
||||||
true,
|
true, // hasBattleBackground
|
||||||
true,
|
true, // hasSkipButtons
|
||||||
true,
|
true, // hasPhaseIcons
|
||||||
true,
|
true, // hasWinLossImages
|
||||||
true,
|
true, // shortcutsVisibleForSkipButtons
|
||||||
new Color(169, 176, 190), // nimbusBlueGrey
|
new Color(169, 176, 190), // nimbusBlueGrey
|
||||||
new Color(214, 217, 223), // control
|
new Color(214, 217, 223), // control
|
||||||
new Color(255, 255, 255), // nimbusLightBackground
|
new Color(255, 255, 255), // nimbusLightBackground
|
||||||
|
|
@ -31,11 +31,11 @@ public enum ThemeType {
|
||||||
new Color(200, 200, 180, 200), // playerPanel_inactiveBackgroundColor
|
new Color(200, 200, 180, 200), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(200, 255, 200, 200), // playerPanel_activeBackgroundColor
|
new Color(200, 255, 200, 200), // playerPanel_activeBackgroundColor
|
||||||
new Color(131, 94, 83, 200), // playerPanel_deadBackgroundColor
|
new Color(131, 94, 83, 200), // playerPanel_deadBackgroundColor
|
||||||
// card icons
|
new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor
|
||||||
new Color(169, 176, 190),
|
new Color(169, 176, 190), // cardIconsFillColor
|
||||||
Color.black,
|
Color.black, // cardIconsStrokeColor
|
||||||
new Color(51, 98, 140),
|
new Color(51, 98, 140), // cardIconsTextColor
|
||||||
Color.black
|
Color.black // textColor
|
||||||
),
|
),
|
||||||
GREY("Grey",
|
GREY("Grey",
|
||||||
"grey-theme/",
|
"grey-theme/",
|
||||||
|
|
@ -55,6 +55,7 @@ public enum ThemeType {
|
||||||
new Color(172, 172, 172, 200), // playerPanel_inactiveBackgroundColor
|
new Color(172, 172, 172, 200), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(180, 234, 180, 200), // playerPanel_activeBackgroundColor
|
new Color(180, 234, 180, 200), // playerPanel_activeBackgroundColor
|
||||||
new Color(99, 99, 99, 200), // playerPanel_deadBackgroundColor
|
new Color(99, 99, 99, 200), // playerPanel_deadBackgroundColor
|
||||||
|
new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor
|
||||||
// card icons
|
// card icons
|
||||||
new Color(158, 158, 158),
|
new Color(158, 158, 158),
|
||||||
Color.black,
|
Color.black,
|
||||||
|
|
@ -79,6 +80,7 @@ public enum ThemeType {
|
||||||
new Color(243, 233, 164), // playerPanel_inactiveBackgroundColor
|
new Color(243, 233, 164), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
||||||
new Color(106, 0, 255), // playerPanel_deadBackgroundColor
|
new Color(106, 0, 255), // playerPanel_deadBackgroundColor
|
||||||
|
new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor
|
||||||
// card icons
|
// card icons
|
||||||
new Color(246, 136, 158),
|
new Color(246, 136, 158),
|
||||||
Color.black,
|
Color.black,
|
||||||
|
|
@ -103,6 +105,7 @@ public enum ThemeType {
|
||||||
new Color(219, 193, 172), // playerPanel_inactiveBackgroundColor
|
new Color(219, 193, 172), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
||||||
new Color(99, 72, 50, 255), // playerPanel_deadBackgroundColor
|
new Color(99, 72, 50, 255), // playerPanel_deadBackgroundColor
|
||||||
|
new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor
|
||||||
// card icons
|
// card icons
|
||||||
new Color(219, 193, 172),
|
new Color(219, 193, 172),
|
||||||
Color.black,
|
Color.black,
|
||||||
|
|
@ -127,6 +130,7 @@ public enum ThemeType {
|
||||||
new Color(172, 195, 219), // playerPanel_inactiveBackgroundColor
|
new Color(172, 195, 219), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
new Color(204, 236, 201), // playerPanel_activeBackgroundColor
|
||||||
new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor
|
new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor
|
||||||
|
new Color(250, 250, 250, 150), // deckEditorToolbarBackgroundColor
|
||||||
// card icons
|
// card icons
|
||||||
new Color(172, 197, 219),
|
new Color(172, 197, 219),
|
||||||
Color.black,
|
Color.black,
|
||||||
|
|
@ -151,10 +155,11 @@ public enum ThemeType {
|
||||||
new Color(43, 45, 49), // playerPanel_inactiveBackgroundColor
|
new Color(43, 45, 49), // playerPanel_inactiveBackgroundColor
|
||||||
new Color(64, 61, 56), // playerPanel_activeBackgroundColor
|
new Color(64, 61, 56), // playerPanel_activeBackgroundColor
|
||||||
new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor
|
new Color(50, 68, 99, 255), // playerPanel_deadBackgroundColor
|
||||||
new Color(172, 197, 219),
|
new Color(50, 50, 50, 250), // deckEditorToolbarBackgroundColor
|
||||||
Color.BLACK,
|
new Color(172, 197, 219), // cardIconsFillColor
|
||||||
new Color(0, 78, 97),
|
Color.BLACK, // cardIconsStrokeColor
|
||||||
new Color(220, 220, 220)
|
new Color(0, 78, 97), // cardIconsTextColor
|
||||||
|
new Color(220, 220, 220) // textColor
|
||||||
);
|
);
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
@ -175,6 +180,7 @@ public enum ThemeType {
|
||||||
private final Color playerPanel_inactiveBackgroundColor;
|
private final Color playerPanel_inactiveBackgroundColor;
|
||||||
private final Color playerPanel_activeBackgroundColor;
|
private final Color playerPanel_activeBackgroundColor;
|
||||||
private final Color playerPanel_deadBackgroundColor;
|
private final Color playerPanel_deadBackgroundColor;
|
||||||
|
private final Color deckEditorToolbarBackgroundColor;
|
||||||
// card icons settings (example: flying icon)
|
// card icons settings (example: flying icon)
|
||||||
private final Color cardIconsFillColor;
|
private final Color cardIconsFillColor;
|
||||||
private final Color cardIconsStrokeColor;
|
private final Color cardIconsStrokeColor;
|
||||||
|
|
@ -201,6 +207,7 @@ public enum ThemeType {
|
||||||
Color playerPanel_inactiveBackgroundColor,
|
Color playerPanel_inactiveBackgroundColor,
|
||||||
Color playerPanel_activeBackgroundColor,
|
Color playerPanel_activeBackgroundColor,
|
||||||
Color playerPanel_deadBackgroundColor,
|
Color playerPanel_deadBackgroundColor,
|
||||||
|
Color deckEditorToolbarBackgroundColor,
|
||||||
Color cardIconsFillColor,
|
Color cardIconsFillColor,
|
||||||
Color cardIconsStrokeColor,
|
Color cardIconsStrokeColor,
|
||||||
Color cardIconsTextColor,
|
Color cardIconsTextColor,
|
||||||
|
|
@ -224,6 +231,7 @@ public enum ThemeType {
|
||||||
this.playerPanel_activeBackgroundColor = playerPanel_activeBackgroundColor;
|
this.playerPanel_activeBackgroundColor = playerPanel_activeBackgroundColor;
|
||||||
this.playerPanel_deadBackgroundColor = playerPanel_deadBackgroundColor;
|
this.playerPanel_deadBackgroundColor = playerPanel_deadBackgroundColor;
|
||||||
this.playerPanel_inactiveBackgroundColor = playerPanel_inactiveBackgroundColor;
|
this.playerPanel_inactiveBackgroundColor = playerPanel_inactiveBackgroundColor;
|
||||||
|
this.deckEditorToolbarBackgroundColor = deckEditorToolbarBackgroundColor;
|
||||||
this.cardIconsFillColor = cardIconsFillColor;
|
this.cardIconsFillColor = cardIconsFillColor;
|
||||||
this.cardIconsStrokeColor = cardIconsStrokeColor;
|
this.cardIconsStrokeColor = cardIconsStrokeColor;
|
||||||
this.cardIconsTextColor = cardIconsTextColor;
|
this.cardIconsTextColor = cardIconsTextColor;
|
||||||
|
|
@ -292,6 +300,10 @@ public enum ThemeType {
|
||||||
return playerPanel_deadBackgroundColor;
|
return playerPanel_deadBackgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Color getDeckEditorToolbarBackgroundColor() {
|
||||||
|
return deckEditorToolbarBackgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
private String getImagePath(String imageType, String name) {
|
private String getImagePath(String imageType, String name) {
|
||||||
return "/" + imageType + "/" + path + name;
|
return "/" + imageType + "/" + path + name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue