prevent mouse from changing outside of the browser
This commit is contained in:
parent
54d49a1e02
commit
246eb45d90
|
|
@ -75,7 +75,7 @@ dependencies {
|
|||
minecraft 'net.minecraftforge:forge:1.19.2-43.2.10'
|
||||
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
|
||||
|
||||
implementation fg.deobf("com.github.Mysticpasta1:mcef-forge:0b89f5faab")
|
||||
implementation fg.deobf("com.github.Mysticpasta1:mcef-forge:b874b3aa35")
|
||||
// implementation fg.deobf("curse.maven:cloth_config_forge-348521:3972423")
|
||||
implementation fg.deobf("curse.maven:SU-370704:4485052")
|
||||
implementation fg.deobf("curse.maven:spark-361579:4381167")
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ yarn_mappings=1.19.2+build.28
|
|||
loader_version=0.14.14
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.0
|
||||
mod_version = 1.3.2
|
||||
maven_group = net.montoyo.wd
|
||||
archives_base_name = webdisplays
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
import net.montoyo.wd.WebDisplays;
|
||||
import net.montoyo.wd.client.ClientProxy;
|
||||
import net.montoyo.wd.utilities.BlockSide;
|
||||
import org.cef.browser.CefBrowserOsr;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import java.util.Optional;
|
||||
|
|
@ -35,6 +36,10 @@ public class GuiMinePad extends WDScreen {
|
|||
public GuiMinePad(ClientProxy.PadData pad) {
|
||||
this();
|
||||
this.pad = pad;
|
||||
|
||||
if (pad.view instanceof CefBrowserOsr osr) {
|
||||
osr.allowCursorChanges(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -212,5 +217,22 @@ public class GuiMinePad extends WDScreen {
|
|||
public boolean isForBlock(BlockPos bp, BlockSide side) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void removed() {
|
||||
super.removed();
|
||||
if (pad.view instanceof CefBrowserOsr osr) {
|
||||
osr.allowCursorChanges(true);
|
||||
osr.onCursorChange(null, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
if (pad.view instanceof CefBrowserOsr osr) {
|
||||
osr.allowCursorChanges(true);
|
||||
osr.onCursorChange(null, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ issueTrackerURL="" #optional
|
|||
|
||||
modId="webdisplays" #mandatory
|
||||
|
||||
version="1.0.0" #mandatory
|
||||
version="1.3.2" #mandatory
|
||||
|
||||
displayName="WebDisplays" #mandatory
|
||||
|
||||
|
|
@ -42,6 +42,6 @@ side="BOTH"
|
|||
[[dependencies.webdisplays]]
|
||||
modId="forgecef"
|
||||
mandatory=true
|
||||
versionRange="[1.0.0, )"
|
||||
versionRange="[1.2.4, )"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user