to the left

This commit is contained in:
sharlottes
2022-04-12 00:38:53 +09:00
parent f500819d8f
commit 149cdba83a
5 changed files with 12 additions and 70 deletions

View File

@@ -12,12 +12,7 @@ public class HUDFragment extends Fragment{
t.name = "Windows";
t.visible(() -> parent.visible);
// windows (totally not a copyright violation)
t.center().right();
t.add(unitTable).size(250f).visible(false);
t.add(waveTable).size(250f).visible(false);
t.add(coreTable).size(250f).visible(false);
t.center().left();
// sidebar
t.add(new TaskbarTable(
unitTable,
@@ -25,6 +20,11 @@ public class HUDFragment extends Fragment{
coreTable
)).visible(TaskbarTable.visibility);
// windows (totally not a copyright violation)
t.add(unitTable).size(250f).visible(false);
t.add(waveTable).size(250f).visible(false);
t.add(coreTable).size(250f).visible(false);
t.update(()->{
for (Element child : t.getChildren()) {
if(child instanceof Updatable u) u.update();

View File

@@ -11,16 +11,14 @@ public class TaskbarTable extends Table{
public TaskbarTable(WindowTable... items){
visible = true;
table(MindowsTex.sidebar,t -> {
table(MindowsTex.sidebar, t -> {
t.top().center();
for(WindowTable w : items){
t.button(w.icon, Styles.emptyi, () -> {
w.visible(visibility);
}).disabled(b -> w.visible)
.size(40f)
.padLeft(5f);
w.visible(visibility);
}).disabled(b -> w.visible).size(40f).padRight(5f);
t.row();
}
}).right().center().width(40f);
}).left().center().width(40f);
}
}