This commit is contained in:
parent
8575693fe5
commit
d1779eb9a8
1 changed files with 4 additions and 6 deletions
|
@ -69,16 +69,14 @@ public class CustomScreen extends BaseItemScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void build_ui(JsonValue layout,Table table, CustomScreen screen){
|
static void build_ui(JsonValue layout,Table table, CustomScreen screen){
|
||||||
Iterator<JsonValue> iter = layout.iterator();
|
for (JsonValue data : layout) {
|
||||||
while (iter.hasNext()){
|
String type = data.getString("type", "");
|
||||||
JsonValue data = iter.next();
|
|
||||||
String type = data.getString("type","");
|
|
||||||
if (type.isEmpty())
|
if (type.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
if (!components.containsKey(type.toLowerCase()))
|
if (!components.containsKey(type.toLowerCase()))
|
||||||
continue;
|
continue;
|
||||||
TriConsumer<Table, CustomScreen,JsonValue> component = components.get(type.toLowerCase());
|
TriConsumer<Table, CustomScreen, JsonValue> component = components.get(type.toLowerCase());
|
||||||
component.accept(table,screen,data);
|
component.accept(table, screen, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue