Merge pull request #3187 from open-osrs/login-screen
This commit is contained in:
@@ -151,7 +151,9 @@ import net.runelite.rs.api.RSDualNode;
|
|||||||
import net.runelite.rs.api.RSEnumComposition;
|
import net.runelite.rs.api.RSEnumComposition;
|
||||||
import net.runelite.rs.api.RSEvictingDualNodeHashTable;
|
import net.runelite.rs.api.RSEvictingDualNodeHashTable;
|
||||||
import net.runelite.rs.api.RSFloorOverlayDefinition;
|
import net.runelite.rs.api.RSFloorOverlayDefinition;
|
||||||
|
import net.runelite.rs.api.RSFont;
|
||||||
import net.runelite.rs.api.RSFriendSystem;
|
import net.runelite.rs.api.RSFriendSystem;
|
||||||
|
import net.runelite.rs.api.RSGameEngine;
|
||||||
import net.runelite.rs.api.RSIndexedSprite;
|
import net.runelite.rs.api.RSIndexedSprite;
|
||||||
import net.runelite.rs.api.RSInterfaceParent;
|
import net.runelite.rs.api.RSInterfaceParent;
|
||||||
import net.runelite.rs.api.RSItemComposition;
|
import net.runelite.rs.api.RSItemComposition;
|
||||||
@@ -3067,5 +3069,26 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
customClientScripts.put((12 << 16) | newScriptId, script);
|
customClientScripts.put((12 << 16) | newScriptId, script);
|
||||||
return newScriptId;
|
return newScriptId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@MethodHook("loginScreen")
|
||||||
|
public static void loginScreenClick(RSGameEngine var0, RSFont var1)
|
||||||
|
{
|
||||||
|
if (!client.isWorldSelectOpen() && (client.getMouseLastPressedX() > client.getLoginScreenXPadding() + 765 || client.getMouseLastPressedY() > 503))
|
||||||
|
{
|
||||||
|
client.setMouseLastPressedX(0);
|
||||||
|
client.setMouseLastPressedX(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@FieldHook("worldSelectOpen")
|
||||||
|
@Inject
|
||||||
|
public static void worldSelectionScreenToggled(int idx)
|
||||||
|
{
|
||||||
|
if (!client.isWorldSelectOpen())
|
||||||
|
{
|
||||||
|
Arrays.fill(client.getBufferProvider().getPixels(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,6 +287,9 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Override
|
@Override
|
||||||
void setOtp(String otp);
|
void setOtp(String otp);
|
||||||
|
|
||||||
|
@Import("xPadding")
|
||||||
|
int getLoginScreenXPadding();
|
||||||
|
|
||||||
@Import("currentLoginField")
|
@Import("currentLoginField")
|
||||||
@Override
|
@Override
|
||||||
int getCurrentLoginField();
|
int getCurrentLoginField();
|
||||||
@@ -640,6 +643,18 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Override
|
@Override
|
||||||
void setMouseIdleTicks(int cycles);
|
void setMouseIdleTicks(int cycles);
|
||||||
|
|
||||||
|
@Import("MouseHandler_lastPressedX")
|
||||||
|
int getMouseLastPressedX();
|
||||||
|
|
||||||
|
@Import("MouseHandler_lastPressedX")
|
||||||
|
void setMouseLastPressedX(int x);
|
||||||
|
|
||||||
|
@Import("MouseHandler_lastPressedY")
|
||||||
|
int getMouseLastPressedY();
|
||||||
|
|
||||||
|
@Import("MouseHandler_lastPressedY")
|
||||||
|
void setMouseLastPressedY(int y);
|
||||||
|
|
||||||
@Import("MouseHandler_lastPressedTimeMillis")
|
@Import("MouseHandler_lastPressedTimeMillis")
|
||||||
@Override
|
@Override
|
||||||
long getMouseLastPressedMillis();
|
long getMouseLastPressedMillis();
|
||||||
|
|||||||
@@ -1773,21 +1773,21 @@ public final class Client extends GameEngine implements Usernamed, OAuthApi {
|
|||||||
Archive.load(); // L: 937
|
Archive.load(); // L: 937
|
||||||
UserComparator9.method2619(); // L: 938
|
UserComparator9.method2619(); // L: 938
|
||||||
} else if (gameState == 5) { // L: 940
|
} else if (gameState == 5) { // L: 940
|
||||||
class360.method6592(this, class13.fontPlain12); // L: 941
|
class360.loginScreen(this, class13.fontPlain12); // L: 941
|
||||||
Archive.load(); // L: 942
|
Archive.load(); // L: 942
|
||||||
UserComparator9.method2619(); // L: 943
|
UserComparator9.method2619(); // L: 943
|
||||||
} else if (gameState != 10 && gameState != 11) { // L: 945
|
} else if (gameState != 10 && gameState != 11) { // L: 945
|
||||||
if (gameState == 20) { // L: 946
|
if (gameState == 20) { // L: 946
|
||||||
class360.method6592(this, class13.fontPlain12); // L: 947
|
class360.loginScreen(this, class13.fontPlain12); // L: 947
|
||||||
this.doCycleLoggedOut(); // L: 948
|
this.doCycleLoggedOut(); // L: 948
|
||||||
} else if (gameState == 50) { // L: 950
|
} else if (gameState == 50) { // L: 950
|
||||||
class360.method6592(this, class13.fontPlain12); // L: 951
|
class360.loginScreen(this, class13.fontPlain12); // L: 951
|
||||||
this.doCycleLoggedOut(); // L: 952
|
this.doCycleLoggedOut(); // L: 952
|
||||||
} else if (gameState == 25) { // L: 954
|
} else if (gameState == 25) { // L: 954
|
||||||
FriendSystem.method1715();
|
FriendSystem.method1715();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
class360.method6592(this, class13.fontPlain12);
|
class360.loginScreen(this, class13.fontPlain12);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gameState == 30) { // L: 955
|
if (gameState == 30) { // L: 955
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.io.IOException;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import net.runelite.mapping.Export;
|
||||||
import net.runelite.mapping.ObfuscatedName;
|
import net.runelite.mapping.ObfuscatedName;
|
||||||
import net.runelite.mapping.ObfuscatedSignature;
|
import net.runelite.mapping.ObfuscatedSignature;
|
||||||
|
|
||||||
@@ -89,7 +90,8 @@ class class360 implements Comparator {
|
|||||||
descriptor = "(Lao;Lmd;B)V",
|
descriptor = "(Lao;Lmd;B)V",
|
||||||
garbageValue = "3"
|
garbageValue = "3"
|
||||||
)
|
)
|
||||||
static void method6592(GameEngine var0, Font var1) {
|
@Export("loginScreen")
|
||||||
|
static void loginScreen(GameEngine var0, Font var1) {
|
||||||
int var4;
|
int var4;
|
||||||
int var38;
|
int var38;
|
||||||
if (Login.worldSelectOpen) { // L: 309
|
if (Login.worldSelectOpen) { // L: 309
|
||||||
|
|||||||
Reference in New Issue
Block a user