runelite-client: add runelite config with tooltip config
This commit is contained in:
@@ -55,6 +55,7 @@ import net.runelite.api.Client;
|
||||
import net.runelite.api.Query;
|
||||
import net.runelite.client.account.AccountSession;
|
||||
import net.runelite.client.config.ConfigManager;
|
||||
import net.runelite.client.config.RuneliteConfig;
|
||||
import net.runelite.client.events.SessionClose;
|
||||
import net.runelite.client.events.SessionOpen;
|
||||
import net.runelite.client.game.ItemManager;
|
||||
@@ -86,6 +87,7 @@ public class RuneLite
|
||||
|
||||
private final RuneliteProperties properties = new RuneliteProperties();
|
||||
private ClientUI gui;
|
||||
private RuneliteConfig config;
|
||||
private PluginManager pluginManager;
|
||||
private final MenuManager menuManager = new MenuManager(this);
|
||||
private OverlayRenderer renderer;
|
||||
@@ -152,8 +154,12 @@ public class RuneLite
|
||||
|
||||
configManager.load();
|
||||
|
||||
config = configManager.getConfig(RuneliteConfig.class);
|
||||
|
||||
eventBus.register(menuManager);
|
||||
|
||||
renderer = new OverlayRenderer();
|
||||
|
||||
// Load the plugins, but does not start them yet.
|
||||
// This will initialize configuration
|
||||
pluginManager = new PluginManager(this);
|
||||
@@ -166,8 +172,6 @@ public class RuneLite
|
||||
// Start plugins
|
||||
pluginManager.start();
|
||||
|
||||
renderer = new OverlayRenderer();
|
||||
|
||||
loadSession();
|
||||
}
|
||||
|
||||
@@ -425,6 +429,11 @@ public class RuneLite
|
||||
return configManager;
|
||||
}
|
||||
|
||||
public RuneliteConfig getConfig()
|
||||
{
|
||||
return config;
|
||||
}
|
||||
|
||||
public ItemManager getItemManager()
|
||||
{
|
||||
return itemManager;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Tyler <https://github.com/tylerthardy>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.config;
|
||||
|
||||
@ConfigGroup(
|
||||
keyName = "runelite",
|
||||
name = "Runelite",
|
||||
description = "Configuration for Runelite client options"
|
||||
)
|
||||
public interface RuneliteConfig
|
||||
{
|
||||
@ConfigItem(
|
||||
keyName = "tooltipLeft",
|
||||
name = "Tooltip left of mouse?",
|
||||
description = "Places the tooltip on the left side of the mouse"
|
||||
)
|
||||
default boolean tooltipLeft()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user