This commit is contained in:
parent
7ec3cf005b
commit
7ea476fd08
2 changed files with 7 additions and 5 deletions
|
@ -13,6 +13,7 @@ public class CBWindow extends JFrame implements WindowListener {
|
|||
|
||||
final Lock openLock = new Lock(true);
|
||||
final ClientBoot parent;
|
||||
final int timeout;
|
||||
|
||||
final Stack<List<CBCallbackContainer>> options = new Stack<>();
|
||||
{
|
||||
|
@ -21,9 +22,10 @@ public class CBWindow extends JFrame implements WindowListener {
|
|||
int selected = 0;
|
||||
Lock justRanSomething = new Lock();
|
||||
|
||||
public CBWindow(String name, ClientBoot parent) {
|
||||
public CBWindow(String name, ClientBoot parent, int timeout) {
|
||||
super();
|
||||
this.parent = parent;
|
||||
this.timeout = timeout;
|
||||
add(new RootComponent());
|
||||
getContentPane().setBackground(new Color(0x303030));
|
||||
setSize(600, 400);
|
||||
|
@ -79,7 +81,7 @@ public class CBWindow extends JFrame implements WindowListener {
|
|||
|
||||
@Override
|
||||
public void windowOpened(WindowEvent e) {
|
||||
openLock.lock(3000);
|
||||
openLock.lock(timeout);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
public class ClientBoot {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new ClientBoot("ClientBoot Test")
|
||||
new ClientBoot("ClientBoot Test", 4000)
|
||||
.option("Print something", x -> x.newScreen()
|
||||
.label("Here, you can print stuff!")
|
||||
.option("Hello!", x1 -> System.out.println("Hello!"))
|
||||
|
@ -23,8 +23,8 @@ public class ClientBoot {
|
|||
private final CBWindow window;
|
||||
public final TCN data = new TCN();
|
||||
|
||||
public ClientBoot(String name) {
|
||||
window = new CBWindow(name, this);
|
||||
public ClientBoot(String name, int timeout) {
|
||||
window = new CBWindow(name, this, timeout);
|
||||
}
|
||||
|
||||
public ClientBoot newScreen() {
|
||||
|
|
Loading…
Add table
Reference in a new issue