mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Fixed Issue 41. Made title displayed on the center.
This commit is contained in:
parent
7efd24464c
commit
14b8069afc
2 changed files with 11 additions and 1 deletions
|
|
@ -210,7 +210,7 @@ public class MageFrame extends javax.swing.JFrame {
|
|||
if (arrowsPanel != null) arrowsPanel.setSize(width, height);
|
||||
if (title != null) {
|
||||
//title.setBorder(BorderFactory.createLineBorder(Color.red));
|
||||
title.setBounds((int)(width - titleRectangle.getWidth())/2, 180, titleRectangle.width, titleRectangle.height);
|
||||
title.setBounds((int)(width - titleRectangle.getWidth())/2, (int)(height - titleRectangle.getHeight())/2, titleRectangle.width, titleRectangle.height);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -311,6 +311,7 @@ public class MageFrame extends javax.swing.JFrame {
|
|||
String server = prefs.get("serverAddress", "");
|
||||
int port = Integer.parseInt(prefs.get("serverPort", ""));
|
||||
try {
|
||||
server = "192.168.121.201";
|
||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||
if (MageFrame.connect(userName, server, port)) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane implements Compon
|
|||
|
||||
protected static DefaultActionCallback defaultCallback = DefaultActionCallback.getInstance();
|
||||
protected static Map<UUID, PermanentView> battlefield;
|
||||
protected static Map<UUID, Integer> attachmentCache = new HashMap<UUID, Integer>();
|
||||
|
||||
/** Creates new form BattlefieldPanel */
|
||||
public BattlefieldPanel(JScrollPane jScrollPane) {
|
||||
|
|
@ -99,6 +100,14 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane implements Compon
|
|||
changed = true;
|
||||
}
|
||||
else {
|
||||
MagePermanent p = permanents.get(permanent.getId());
|
||||
if (!changed) {
|
||||
int s1 = permanent.getAttachments() == null ? 0 : permanent.getAttachments().size();
|
||||
int s2 = p.getLinks().size();
|
||||
if (s1 != s2) {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
permanents.get(permanent.getId()).update(permanent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue