Skip to content

Commit

Permalink
Fixed some graphical bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Moresteck committed Jul 3, 2021
1 parent feadcc1 commit ce02f1b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/betacraft/launcher/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

/** Main class */
public class Launcher {
public static String VERSION = "1.09_14-pre1"; // TODO Always update this
public static String VERSION = "1.09_14-pre2"; // TODO Always update this

public static Instance currentInstance;
public static boolean forceUpdate = false;
Expand Down
19 changes: 10 additions & 9 deletions src/main/java/org/betacraft/launcher/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public void actionPerformed(ActionEvent e) {
Launcher.auth.authenticate();

Window.nick_input.setText(Launcher.getNickname());
Window.setTab(Window.tab);
// since there's basically no account selector, this must do... awkward
if (Launcher.auth instanceof NoAuth) {
nick_input.setEnabled(true);
Expand Down Expand Up @@ -226,29 +225,31 @@ public void update() {
}

public static void setTab(Tab tab) {
if (Window.centerPanel != null) mainWindow.remove(Window.centerPanel);
centerPanel = new WebsitePanel().getEmptyTabFor(tab);
Window.tab = Tab.SERVER_LIST;
mainWindow.add(Window.centerPanel, BorderLayout.CENTER);
mainWindow.setPreferredSize(mainWindow.getSize());
mainWindow.pack();
// if (Window.centerPanel != null) mainWindow.remove(Window.centerPanel);
// centerPanel = new WebsitePanel().getEmptyTabFor(tab);
// Window.tab = Tab.SERVER_LIST;
// mainWindow.add(Window.centerPanel, BorderLayout.CENTER);
// mainWindow.setPreferredSize(mainWindow.getSize());
// mainWindow.pack();
if (tab == Tab.CHANGELOG) {
new Thread() {
public void run() {
if (Window.centerPanel != null) mainWindow.remove(Window.centerPanel);
if (Window.centerPanel != null) mainWindow.getContentPane().remove(Window.centerPanel);
centerPanel = new WebsitePanel().getUpdateNews(true);
Window.tab = Tab.CHANGELOG;
mainWindow.add(Window.centerPanel, BorderLayout.CENTER);
mainWindow.setPreferredSize(mainWindow.getSize());
mainWindow.pack();
}
}.start();
} else if (tab == Tab.SERVER_LIST) {
new Thread() {
public void run() {
if (Window.centerPanel != null) mainWindow.remove(Window.centerPanel);
if (Window.centerPanel != null) mainWindow.getContentPane().remove(Window.centerPanel);
centerPanel = new WebsitePanel().getServers(true);
Window.tab = Tab.SERVER_LIST;
mainWindow.add(Window.centerPanel, BorderLayout.CENTER);
mainWindow.setPreferredSize(mainWindow.getSize());
mainWindow.pack();
}
}.start();
Expand Down
1 change: 0 additions & 1 deletion src/main/java/pl/betacraft/auth/Authenticator.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ default void authSuccess() {
Window.nick_input.setText(Launcher.getNickname());
Window.nick_input.setEnabled(false);
Window.loginButton.setText(Lang.LOGOUT_BUTTON);
Window.setTab(Window.tab);
});
};
}
1 change: 0 additions & 1 deletion src/main/java/pl/betacraft/auth/NoAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public void authSuccess() {
Window.nick_input.setText(Launcher.getNickname());
Window.nick_input.setEnabled(true);
Window.loginButton.setText(Lang.LOGIN_BUTTON);
Window.setTab(Window.tab);
}

public boolean invalidate() {
Expand Down

0 comments on commit ce02f1b

Please sign in to comment.