File tree Expand file tree Collapse file tree
src/main/java/dev/isxander/controlify/screenop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ Find this new option in the "Sensitivity" section of your controller's settings.
2323- Fix crash when attempting to run Controlify with Title Screen mods that remove vanilla buttons
2424- Enhanced sodium compatibility is temporarily disabled on 1.21.10-neoforge target due to issues.
2525- Fix on-screen keyboard opening in the chat menu regardless of settings
26+ - Updated Controlify's screen processor to sets the last vanilla input type,
27+ for compatibility with modded screens (e.g., render the tooltips).
Original file line number Diff line number Diff line change 1616import dev .isxander .controlify .utils .HoldRepeatHelper ;
1717import dev .isxander .controlify .virtualmouse .VirtualMouseBehaviour ;
1818import dev .isxander .controlify .virtualmouse .VirtualMouseHandler ;
19+ import net .minecraft .client .InputType ;
1920import net .minecraft .client .Minecraft ;
2021import net .minecraft .client .gui .ComponentPath ;
2122import net .minecraft .client .gui .GuiGraphics ;
@@ -197,7 +198,7 @@ protected void handleButtons(ControllerEntity controller) {
197198 }
198199
199200 protected void handleScreenVMouse (ControllerEntity controller , VirtualMouseHandler vmouse ) {
200-
201+ Minecraft . getInstance (). setLastInputType ( InputType . MOUSE );
201202 }
202203
203204 protected boolean handleComponentButtonOverride (ControllerEntity controller ) {
@@ -251,6 +252,14 @@ protected void onTabChanged(ControllerEntity controller) {
251252
252253 public void onWidgetRebuild () {
253254 setInitialFocus ();
255+ updateLastInputTypeOnRebild ();
256+ }
257+
258+ private void updateLastInputTypeOnRebild () {
259+ final VirtualMouseHandler virtualMouseBehaviour = Controlify .instance ().virtualMouseHandler ();
260+ if (virtualMouseBehaviour != null && !virtualMouseBehaviour .isVirtualMouseEnabled ()) {
261+ Minecraft .getInstance ().setLastInputType (InputType .KEYBOARD_ARROW );
262+ }
254263 }
255264
256265 public void onVirtualMouseToggled (boolean enabled ) {
You can’t perform that action at this time.
0 commit comments