This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
forked from Vivecraft/VivecraftMod
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/Multiloader-1.20' into M…
…ultiloader-1.20.2
- Loading branch information
Showing
43 changed files
with
955 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
common/src/main/java/org/vivecraft/client/gui/settings/GuiKeyboardSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.vivecraft.client.gui.settings; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.gui.components.AbstractWidget; | ||
import net.minecraft.client.gui.screens.Screen; | ||
import org.vivecraft.client.gui.framework.GuiVROption; | ||
import org.vivecraft.client.gui.framework.GuiVROptionsBase; | ||
import org.vivecraft.client.gui.framework.VROptionEntry; | ||
import org.vivecraft.client_vr.gameplay.screenhandlers.GuiHandler; | ||
import org.vivecraft.client_vr.gameplay.screenhandlers.KeyboardHandler; | ||
import org.vivecraft.client_vr.settings.VRSettings; | ||
|
||
public class GuiKeyboardSettings extends GuiVROptionsBase { | ||
private final VROptionEntry[] keyboardOptions = new VROptionEntry[]{ | ||
new VROptionEntry(VRSettings.VrOptions.PHYSICAL_KEYBOARD, (button, mousePos) -> { | ||
KeyboardHandler.setOverlayShowing(false); | ||
return false; | ||
}), | ||
new VROptionEntry(VRSettings.VrOptions.AUTO_OPEN_KEYBOARD), | ||
new VROptionEntry(VRSettings.VrOptions.PHYSICAL_KEYBOARD_SCALE), | ||
new VROptionEntry(VRSettings.VrOptions.KEYBOARD_PRESS_BINDS), | ||
new VROptionEntry(VRSettings.VrOptions.PHYSICAL_KEYBOARD_THEME) | ||
}; | ||
|
||
public GuiKeyboardSettings(Screen guiScreen) { | ||
super(guiScreen); | ||
} | ||
|
||
public void init() { | ||
this.vrTitle = "vivecraft.options.screen.keyboard"; | ||
super.init(this.keyboardOptions, true); | ||
super.addDefaultButtons(); | ||
} | ||
|
||
protected void loadDefaults() { | ||
super.loadDefaults(); | ||
} | ||
|
||
protected void actionPerformed(AbstractWidget widget) { | ||
if (widget instanceof GuiVROption button) { | ||
if (button.getId() == VRSettings.VrOptions.PHYSICAL_KEYBOARD_THEME.ordinal()) { | ||
KeyboardHandler.physicalKeyboard.init(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
common/src/main/java/org/vivecraft/client_vr/extensions/WindowExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.vivecraft.client_vr.extensions; | ||
|
||
public interface WindowExtension { | ||
int vivecraft$getActualScreenHeight(); | ||
|
||
int vivecraft$getActualScreenWidth(); | ||
} |
Oops, something went wrong.