update cursor textures

This commit is contained in:
GiantLuigi4 2023-09-27 23:16:07 -04:00
parent ce718eeea2
commit 92d5da727e
3 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -85,6 +85,7 @@ import org.cef.CefSettings;
import org.cef.browser.CefBrowser;
import org.cef.browser.CefFrame;
import org.cef.handler.CefDisplayHandler;
import org.cef.misc.CefCursorType;
import org.cef.network.CefRequest;
import org.joml.Vector3d;
import org.lwjgl.glfw.GLFW;
@ -175,8 +176,11 @@ public class ClientProxy extends SharedProxy implements CefDisplayHandler/*, IJS
if (sc == null) return;
int coordX = sc.mouseType * 15;
int coordY = coordX / 256;
coordX -= coordY * 256;
int coordY = coordX / 255;
coordX -= coordY * 255;
coordY *= 15;
// for some reason, the cursor gets offset at this value
if (sc.mouseType >= CefCursorType.NOT_ALLOWED.ordinal()) coordX -= 15;
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.ONE_MINUS_DST_COLOR, GlStateManager.DestFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB