Added some important stuff
This commit is contained in:
@@ -56,7 +56,7 @@ public class MyScreen extends BaseOwoScreen<FlowLayout> {
|
||||
// ----- Sidebar -----
|
||||
FlowLayout sidebar = UIContainers.verticalFlow(Sizing.fixed(sidebarWidth), Sizing.fixed(innerHeight));
|
||||
sidebar.horizontalAlignment(HorizontalAlignment.CENTER);
|
||||
sidebar.verticalAlignment(VerticalAlignment.CENTER);
|
||||
sidebar.verticalAlignment(VerticalAlignment.TOP);
|
||||
sidebar.padding(Insets.of(4));
|
||||
sidebar.gap(2);
|
||||
|
||||
@@ -75,6 +75,22 @@ public class MyScreen extends BaseOwoScreen<FlowLayout> {
|
||||
sidebarButton.verticalSizing(Sizing.fixed(20));
|
||||
sidebarButton.scale().animate(300, Easing.CUBIC, new ScaleValue(1f)).forwards();
|
||||
|
||||
var friendsButton = new ScalableButton(Component.literal("-"), btn -> {
|
||||
Minecraft.getInstance().getSoundManager().play(
|
||||
SimpleSoundInstance.forUI(SoundEvents.UI_BUTTON_CLICK.value(), 2.0F, 2)
|
||||
);
|
||||
},
|
||||
0x80FFFFFF, // base fill
|
||||
0xA0FFFFFF, // hovered fill
|
||||
0xFFFFFFFF, // base outline
|
||||
0xFFFFFFFF, // hovered outline
|
||||
1 // outline width
|
||||
);
|
||||
friendsButton.horizontalSizing(Sizing.fixed(20));
|
||||
friendsButton.verticalSizing(Sizing.fixed(20));
|
||||
friendsButton.scale().animate(300, Easing.CUBIC, new ScaleValue(1f)).forwards();
|
||||
|
||||
sidebar.child(friendsButton);
|
||||
sidebar.child(sidebarButton);
|
||||
panel.child(sidebar);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user