forked from External/mage
Mostly code format fixes.
This commit is contained in:
parent
7cf4ca3cae
commit
f99cd21275
37 changed files with 226 additions and 189 deletions
|
|
@ -45,7 +45,9 @@ public class KeyBindButton extends JButton implements ActionListener {
|
|||
private void applyNewKeycode(int code) {
|
||||
preferences.getKeybindButtons().stream()
|
||||
.filter(b -> b != KeyBindButton.this)
|
||||
.filter(b -> b.getKeyCode() == code)
|
||||
.filter(b -> {
|
||||
return b.keyCode == code;
|
||||
})
|
||||
.forEach(b -> b.setKeyCode(0));
|
||||
|
||||
setKeyCode(code);
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ public class DialogManager extends JComponent implements MouseListener,
|
|||
synchronized (dialogManagers) {
|
||||
if (!dialogManagers.containsKey(gameId)) {
|
||||
DialogManager dialogManager = new DialogManager();
|
||||
dialogManager.setScreenWidth(768);
|
||||
dialogManager.setScreenHeight(1024);
|
||||
dialogManager.screen_width = 768;
|
||||
dialogManager.screen_height = 1024;
|
||||
dialogManager.setBounds(0, 0, 768, 1024);
|
||||
dialogManager.setVisible(false);
|
||||
dialogManagers.put(gameId, dialogManager);
|
||||
|
|
@ -96,8 +96,8 @@ public class DialogManager extends JComponent implements MouseListener,
|
|||
public static void updateParams(int width, int height, boolean isVisible) {
|
||||
synchronized (dialogManagers) {
|
||||
for (DialogManager dialogManager : dialogManagers.values()) {
|
||||
dialogManager.setScreenWidth(width);
|
||||
dialogManager.setScreenHeight(height);
|
||||
dialogManager.screen_width = width;
|
||||
dialogManager.screen_height = height;
|
||||
dialogManager.setBounds(0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,8 +141,7 @@ public class ChoiceDialog extends IDialogPanel {
|
|||
remove(toRemove.get(i));
|
||||
}
|
||||
|
||||
java.util.List<CardView> cardList = new ArrayList<CardView>();
|
||||
cardList.addAll(cards.values());
|
||||
java.util.List<CardView> cardList = new ArrayList<CardView>(cards.values());
|
||||
|
||||
int width = SettingsManager.getInstance().getCardSize().width;
|
||||
int height = SettingsManager.getInstance().getCardSize().height;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue