mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-02-01 23:21:40 +01:00
fixed classic loading
added spacer to buttons
This commit is contained in:
parent
d8841be601
commit
19a2d1715b
@ -48,6 +48,8 @@ public class ViaFabricPlus {
|
||||
PreLoadCallback.EVENT.invoker().onLoad();
|
||||
|
||||
CustomClassicProtocolExtensions.create();
|
||||
ClassicItemSelectionScreen.create();
|
||||
|
||||
new ProtocolHack();
|
||||
|
||||
FinishMinecraftLoadCallback.EVENT.register(() -> {
|
||||
@ -62,7 +64,6 @@ public class ViaFabricPlus {
|
||||
|
||||
// Classic Stuff
|
||||
ChatLengthDefinition.create();
|
||||
ClassicItemSelectionScreen.create();
|
||||
ClassicProtocolCommands.create();
|
||||
|
||||
// Bedrock Stuff
|
||||
|
@ -41,10 +41,10 @@ public class MixinMultiplayerScreen extends Screen {
|
||||
|
||||
final int orientation = GeneralSettings.INSTANCE.mainButtonOrientation.getIndex();
|
||||
switch (orientation) {
|
||||
case 0 -> builder = builder.position(0, 0);
|
||||
case 1 -> builder = builder.position(width - 98, 0);
|
||||
case 2 -> builder = builder.position(0, height - 20);
|
||||
case 3 -> builder = builder.position(width - 98, height - 20);
|
||||
case 0 -> builder = builder.position(5, 5);
|
||||
case 1 -> builder = builder.position(width - 98 - 5, 5);
|
||||
case 2 -> builder = builder.position(5, height - 20 - 5);
|
||||
case 5 -> builder = builder.position(width - 98 - 5, height - 20 - 5);
|
||||
}
|
||||
|
||||
this.addDrawableChild(builder.size(98, 20).build());
|
||||
|
@ -17,9 +17,7 @@
|
||||
*/
|
||||
package de.florianmichael.viafabricplus.injection.mixin.bridge;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import de.florianmichael.viafabricplus.settings.groups.BridgeSettings;
|
||||
import de.florianmichael.vialoadingbase.ViaLoadingBase;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.screen.option.OptionsScreen;
|
||||
|
@ -65,9 +65,9 @@ public class ProtocolSelectionScreen extends Screen {
|
||||
super.init();
|
||||
|
||||
this.addDrawableChild(new SlotList(this.client, width, height, 3 + 3 /* start offset */ + (textRenderer.fontHeight + 2) * 3 /* title is 2 */, height + 5, textRenderer.fontHeight + 4));
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("<-"), button -> this.close()).position(0, 0).size(20, 20).build());
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("<-"), button -> this.close()).position(5, 5).size(20, 20).build());
|
||||
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.translatable("words.viafabricplus.settings"), button -> client.setScreen(SettingsScreen.get(this))).position(width - 98, 0).size(98, 20).build());
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.translatable("words.viafabricplus.settings"), button -> client.setScreen(SettingsScreen.get(this))).position(width - 98 - 5, 5).size(98, 20).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +60,7 @@ public class SettingsScreen extends Screen {
|
||||
super.init();
|
||||
|
||||
this.addDrawableChild(new SlotList(this.client, width, height, 3 + 3 /* start offset */ + (textRenderer.fontHeight + 2) * 3 /* title is 2 */, height + 5, (textRenderer.fontHeight + 2) * 2));
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("<-"), button -> this.close()).position(0, 0).size(20, 20).build());
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("<-"), button -> this.close()).position(5, 5).size(20, 20).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user