openrune: just about finish rework, gets to login
This commit is contained in:
@@ -52,6 +52,8 @@ import net.runelite.client.util.DeferredEventBus;
|
||||
import net.runelite.client.util.ExecutorServiceExceptionLogger;
|
||||
import net.runelite.http.api.chat.ChatClient;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@AllArgsConstructor
|
||||
public class RuneLiteModule extends AbstractModule
|
||||
@@ -87,6 +89,10 @@ public class RuneLiteModule extends AbstractModule
|
||||
bind(EventBus.class)
|
||||
.annotatedWith(Names.named("Deferred EventBus"))
|
||||
.to(DeferredEventBus.class);
|
||||
|
||||
bind(Logger.class)
|
||||
.annotatedWith(Names.named("Core Logger"))
|
||||
.toInstance(LoggerFactory.getLogger(RuneLite.class));
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
||||
@@ -85,7 +85,6 @@ import net.runelite.api.Player;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.api.events.PlayerChanged;
|
||||
import net.runelite.api.events.UsernameChanged;
|
||||
import net.runelite.api.events.WorldChanged;
|
||||
import net.runelite.client.RuneLite;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
@@ -1043,12 +1042,6 @@ public class ConfigManager
|
||||
updateRSProfile();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onWorldChanged(WorldChanged ev)
|
||||
{
|
||||
updateRSProfile();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
private void onPlayerChanged(PlayerChanged ev)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,6 @@ package net.runelite.client.config;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.runelite.client.ui.FontManager;
|
||||
|
||||
import java.awt.Font;
|
||||
|
||||
@Getter
|
||||
|
||||
@@ -109,8 +109,8 @@ public class MenuManager
|
||||
{
|
||||
for (MenuEntry menuEntry : client.getMenuEntries())
|
||||
{
|
||||
String option = menuEntry.getOption();
|
||||
String target = menuEntry.getTarget();
|
||||
String option = menuEntry.getMenuOption();
|
||||
String target = menuEntry.getMenuTarget();
|
||||
|
||||
if (option.equals(customMenuOption.getMenuOption()) && target.equals(customMenuOption.getMenuTarget()))
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public class MenuManager
|
||||
return;
|
||||
}
|
||||
|
||||
int widgetId = event.getActionParam1();
|
||||
int widgetId = event.getWidgetId();
|
||||
Collection<WidgetMenuOption> options = managedMenuOptions.get(widgetId);
|
||||
|
||||
for (WidgetMenuOption currentMenu : options)
|
||||
@@ -139,9 +139,9 @@ public class MenuManager
|
||||
menuEntries = Arrays.copyOf(menuEntries, menuEntries.length + 1);
|
||||
|
||||
MenuEntry menuEntry = menuEntries[menuEntries.length - 1] = new MenuEntry();
|
||||
menuEntry.setOption(currentMenu.getMenuOption());
|
||||
menuEntry.setParam1(widgetId);
|
||||
menuEntry.setTarget(currentMenu.getMenuTarget());
|
||||
menuEntry.setMenuOption(currentMenu.getMenuOption());
|
||||
menuEntry.setWidgetId(widgetId);
|
||||
menuEntry.setMenuTarget(currentMenu.getMenuTarget());
|
||||
menuEntry.setType(MenuAction.RUNELITE.getId());
|
||||
|
||||
client.setMenuEntries(menuEntries);
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package net.runelite.client.menus;
|
||||
|
||||
import net.runelite.api.widgets.WidgetInfo;
|
||||
|
||||
import java.awt.Color;
|
||||
import net.runelite.client.ui.JagexColors;
|
||||
import net.runelite.client.util.ColorUtil;
|
||||
|
||||
@@ -133,37 +133,11 @@ public class ClientLoader implements Supplier<Applet>
|
||||
StandardOpenOption.CREATE, StandardOpenOption.READ, StandardOpenOption.WRITE);
|
||||
FileLock flock = lockfile.lock())
|
||||
{
|
||||
SplashScreen.stage(.05, null, "Downloading Old School RuneScape");
|
||||
try
|
||||
{
|
||||
updateVanilla(config);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
// try again with the fallback config and gamepack
|
||||
if (!config.isFallback())
|
||||
{
|
||||
log.warn("Unable to download game client, attempting to use fallback config", ex);
|
||||
config = downloadFallbackConfig();
|
||||
updateVanilla(config);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
if (updateCheckMode == AUTO)
|
||||
{
|
||||
SplashScreen.stage(.35, null, "Patching");
|
||||
applyPatch();
|
||||
}
|
||||
|
||||
SplashScreen.stage(.40, null, "Loading client");
|
||||
File jarFile = updateCheckMode == AUTO ? PATCHED_CACHE : VANILLA_CACHE;
|
||||
// create the classloader for the jar while we hold the lock, and eagerly load and link all classes
|
||||
// in the jar. Otherwise the jar can change on disk and can break future classloads.
|
||||
classLoader = createJarClassLoader(jarFile);
|
||||
classLoader = createJarClassLoader(new File("./injected-client/build/libs/injected-client-3.5.4.jar"));
|
||||
}
|
||||
|
||||
SplashScreen.stage(.465, "Starting", "Starting Old School RuneScape");
|
||||
@@ -175,7 +149,7 @@ public class ClientLoader implements Supplier<Applet>
|
||||
return rs;
|
||||
}
|
||||
catch (IOException | ClassNotFoundException | InstantiationException | IllegalAccessException
|
||||
| VerificationException | SecurityException e)
|
||||
| SecurityException e)
|
||||
{
|
||||
log.error("Error loading RS!", e);
|
||||
|
||||
@@ -543,7 +517,7 @@ public class ClientLoader implements Supplier<Applet>
|
||||
|
||||
if (rs instanceof Client)
|
||||
{
|
||||
log.info("client-patch {}", ((Client) rs).getBuildID());
|
||||
//.info("client-patch {}", ((Client) rs).getBuildID());
|
||||
}
|
||||
|
||||
return rs;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class OverlayManager
|
||||
|
||||
event.consume();
|
||||
|
||||
Overlay overlay = overlays.get(event.getId());
|
||||
Overlay overlay = overlays.get(event.getType());
|
||||
if (overlay != null)
|
||||
{
|
||||
List<OverlayMenuEntry> menuEntries = overlay.getMenuEntries();
|
||||
|
||||
@@ -877,10 +877,10 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
|
||||
OverlayMenuEntry overlayMenuEntry = menuEntries.get(i);
|
||||
|
||||
final MenuEntry entry = new MenuEntry();
|
||||
entry.setOption(overlayMenuEntry.getOption());
|
||||
entry.setTarget(ColorUtil.wrapWithColorTag(overlayMenuEntry.getTarget(), JagexColors.MENU_TARGET));
|
||||
entry.setMenuOption(overlayMenuEntry.getOption());
|
||||
entry.setMenuTarget(ColorUtil.wrapWithColorTag(overlayMenuEntry.getTarget(), JagexColors.MENU_TARGET));
|
||||
entry.setType(overlayMenuEntry.getMenuAction().getId());
|
||||
entry.setIdentifier(overlayManager.getOverlays().indexOf(overlay)); // overlay id
|
||||
entry.setType(overlayManager.getOverlays().indexOf(overlay)); // overlay id
|
||||
|
||||
entries[i] = entry;
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ public class ObsidianSkin extends SubstanceSkin
|
||||
|
||||
final SubstanceColorSchemeBundle defaultSchemeBundle = new SubstanceColorSchemeBundle(
|
||||
activeScheme, enabledScheme, enabledScheme);
|
||||
defaultSchemeBundle.registerColorScheme(enabledScheme, 0.6f,
|
||||
ComponentState.DISABLED_UNSELECTED);
|
||||
defaultSchemeBundle.registerColorScheme(activeScheme, 0.6f,
|
||||
ComponentState.DISABLED_SELECTED);
|
||||
//defaultSchemeBundle.registerColorScheme(enabledScheme, 0.6f,
|
||||
// ComponentState.DISABLED_UNSELECTED);
|
||||
//defaultSchemeBundle.registerColorScheme(activeScheme, 0.6f,
|
||||
// ComponentState.DISABLED_SELECTED);
|
||||
|
||||
// borders
|
||||
final SubstanceColorScheme borderDisabledSelectedScheme = schemes
|
||||
@@ -82,9 +82,9 @@ public class ObsidianSkin extends SubstanceSkin
|
||||
final SubstanceColorScheme markActiveScheme = schemes.get("RuneLite Mark Active");
|
||||
defaultSchemeBundle.registerColorScheme(markActiveScheme, ColorSchemeAssociationKind.MARK,
|
||||
ComponentState.getActiveStates());
|
||||
defaultSchemeBundle.registerColorScheme(markActiveScheme, 0.6f,
|
||||
ColorSchemeAssociationKind.MARK, ComponentState.DISABLED_SELECTED,
|
||||
ComponentState.DISABLED_UNSELECTED);
|
||||
//defaultSchemeBundle.registerColorScheme(markActiveScheme, 0.6f,
|
||||
// ColorSchemeAssociationKind.MARK, ComponentState.DISABLED_SELECTED,
|
||||
// ComponentState.DISABLED_UNSELECTED);
|
||||
|
||||
// separators
|
||||
final SubstanceColorScheme separatorScheme = schemes.get("RuneLite Separator");
|
||||
@@ -102,8 +102,8 @@ public class ObsidianSkin extends SubstanceSkin
|
||||
|
||||
final SubstanceColorSchemeBundle decorationsSchemeBundle = new SubstanceColorSchemeBundle(
|
||||
activeScheme, enabledScheme, enabledScheme);
|
||||
decorationsSchemeBundle.registerColorScheme(enabledScheme, 0.5f,
|
||||
ComponentState.DISABLED_UNSELECTED);
|
||||
//decorationsSchemeBundle.registerColorScheme(enabledScheme, 0.5f,
|
||||
// ComponentState.DISABLED_UNSELECTED);
|
||||
|
||||
// borders
|
||||
decorationsSchemeBundle.registerColorScheme(borderDisabledSelectedScheme,
|
||||
@@ -129,8 +129,8 @@ public class ObsidianSkin extends SubstanceSkin
|
||||
|
||||
final SubstanceColorSchemeBundle headerSchemeBundle = new SubstanceColorSchemeBundle(activeScheme,
|
||||
enabledScheme, enabledScheme);
|
||||
headerSchemeBundle.registerColorScheme(enabledScheme, 0.5f,
|
||||
ComponentState.DISABLED_UNSELECTED);
|
||||
//headerSchemeBundle.registerColorScheme(enabledScheme, 0.5f,
|
||||
// ComponentState.DISABLED_UNSELECTED);
|
||||
|
||||
// borders
|
||||
final SubstanceColorScheme headerBorderScheme = schemes.get("RuneLite Header Border");
|
||||
@@ -142,13 +142,13 @@ public class ObsidianSkin extends SubstanceSkin
|
||||
headerSchemeBundle.registerColorScheme(markActiveScheme, ColorSchemeAssociationKind.MARK,
|
||||
ComponentState.getActiveStates());
|
||||
|
||||
headerSchemeBundle.registerHighlightColorScheme(activeScheme, 0.7f,
|
||||
ComponentState.ROLLOVER_UNSELECTED, ComponentState.ROLLOVER_ARMED,
|
||||
ComponentState.ARMED);
|
||||
headerSchemeBundle.registerHighlightColorScheme(activeScheme, 0.8f,
|
||||
ComponentState.SELECTED);
|
||||
headerSchemeBundle.registerHighlightColorScheme(activeScheme, 1.0f,
|
||||
ComponentState.ROLLOVER_SELECTED);
|
||||
//headerSchemeBundle.registerHighlightColorScheme(activeScheme, 0.7f,
|
||||
// ComponentState.ROLLOVER_UNSELECTED, ComponentState.ROLLOVER_ARMED,
|
||||
// ComponentState.ARMED);
|
||||
//headerSchemeBundle.registerHighlightColorScheme(activeScheme, 0.8f,
|
||||
// ComponentState.SELECTED);
|
||||
//headerSchemeBundle.registerHighlightColorScheme(activeScheme, 1.0f,
|
||||
// ComponentState.ROLLOVER_SELECTED);
|
||||
|
||||
final SubstanceColorScheme headerWatermarkScheme = schemes.get("RuneLite Header Watermark");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user