add conversion to a label
All checks were successful
/ Build & Publish (push) Successful in 41s

This commit is contained in:
Daniella 2024-06-25 07:16:48 +02:00
parent 74abba5e80
commit 5044570037
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 11 additions and 4 deletions

View file

@ -1,11 +1,18 @@
package de.com.baseband.clientboot;
public class CBCallbackContainer {
private final CBWindow parent;
public String name;
final CBCallback callback;
CBCallback callback;
CBCallbackContainer(String name, CBCallback callback) {
CBCallbackContainer(CBWindow parent, String name, CBCallback callback) {
this.name = name;
this.callback = callback;
this.parent = parent;
}
public void toLabel() {
callback = null;
parent.checkSelected(false);
}
}

View file

@ -38,12 +38,12 @@ public class ClientBoot {
List<CBCallbackContainer> list = window.options.peek();
if(window.selected == list.size())
window.selected++;
list.add(new CBCallbackContainer(name, null));
list.add(new CBCallbackContainer(window, name, null));
return this;
}
public ClientBoot option(String name, CBCallback callback) {
window.options.peek().add(new CBCallbackContainer(name, callback));
window.options.peek().add(new CBCallbackContainer(window, name, callback));
return this;
}