Functional navbar (toggleable in ClientSettings) (#560)

* Fixed client frame offsets/padding

* Functional navbar (toggleable in ClientSettings)
This commit is contained in:
Pazaz
2023-01-28 17:06:05 -05:00
committed by GitHub
parent e517be1bfb
commit 62b26c5585
11 changed files with 218 additions and 29 deletions
+8 -14
View File
@@ -6,29 +6,23 @@ import java.awt.*;
final class RSFrame extends Frame {
public RSFrame(RSApplet RSApplet_) {
rsApplet = RSApplet_;
public RSFrame(RSApplet applet) {
rsApplet = applet;
setTitle(ClientSettings.SERVER_NAME + " World: " + ClientSettings.SERVER_WORLD);
this.setResizable(false);
this.setBackground(Color.BLACK);
this.setLayout(new BorderLayout());
this.add(rsApplet);
this.add(applet, BorderLayout.CENTER);
this.pack();
this.setLocationRelativeTo(null);
this.setVisible(true);
this.toFront();
this.setLocationRelativeTo(null);
}
@Override
public void update(Graphics g) {
rsApplet.update(g);
}
@Override
public void paint(Graphics g) {
rsApplet.paint(g);
this.transferFocus();
}
private final RSApplet rsApplet;
}