plugintype: Rename important to system. (#2794)

This commit is contained in:
Ganom
2020-08-31 16:13:06 -04:00
committed by GitHub
parent 9b2eb98372
commit e3132599bf
3 changed files with 10 additions and 10 deletions

View File

@@ -13,12 +13,12 @@ public enum PluginType
SKILLING("Skilling"),
UTILITY("Utilities"),
MISCELLANEOUS("Miscellaneous"),
IMPORTANT("System"),
SYSTEM("System"),
MINIGAME("Minigame"),
GAMEMODE("Gamemode"),
UNCATEGORIZED("Uncategorized");
private String name;
private final String name;
@Override
public String toString()

View File

@@ -85,12 +85,12 @@ public class ConfigPlugin extends Plugin
pluginListPanel = pluginListPanelProvider.get();
pluginListPanel.addFakePlugin(
new PluginConfigurationDescriptor(
"OpenOSRS", "OpenOSRS client settings", PluginType.IMPORTANT,
"OpenOSRS", "OpenOSRS client settings", PluginType.SYSTEM,
new String[]{"sorting", "external", "logs", "categories", "colors", "opacity", "pin"},
null, openOSRSConfig, configManager.getConfigDescriptor(openOSRSConfig)
),
new PluginConfigurationDescriptor(
"RuneLite", "RuneLite client settings", PluginType.IMPORTANT,
"RuneLite", "RuneLite client settings", PluginType.SYSTEM,
new String[]{"client", "notification", "size", "position", "window", "chrome", "focus", "font", "overlay", "tooltip", "infobox"},
null, runeLiteConfig, configManager.getConfigDescriptor(runeLiteConfig)
),
@@ -104,7 +104,7 @@ public class ConfigPlugin extends Plugin
{
pluginListPanel.addFakePlugin(
new PluginConfigurationDescriptor(
"Launcher", "Launcher settings", PluginType.IMPORTANT,
"Launcher", "Launcher settings", PluginType.SYSTEM,
new String[]{"hw", "nightly", "stable", "proxy", "bootstrap"},
null, launcherConfig, configManager.getConfigDescriptor(launcherConfig)
));
@@ -166,4 +166,4 @@ public class ConfigPlugin extends Plugin
return Version.valueOf(launcherVersion).greaterThanOrEqualTo(Version.valueOf(version));
}
}
}

View File

@@ -113,7 +113,7 @@ public class PluginListPanel extends PluginPanel
);
private static final List<String> colorOptions = Arrays.asList("enabledColors", "pvmColor", "pvpColor", "skillingColor", "utilityColor", "minigameColor", "miscellaneousColor", "gamemodeColor");
private static final List<PluginType> definedOrder = List.of(PluginType.IMPORTANT, PluginType.PVM, PluginType.SKILLING, PluginType.PVP, PluginType.UTILITY, PluginType.MINIGAME, PluginType.MISCELLANEOUS, PluginType.GAMEMODE, PluginType.UNCATEGORIZED);
private static final List<PluginType> definedOrder = List.of(PluginType.SYSTEM, PluginType.PVM, PluginType.SKILLING, PluginType.PVP, PluginType.UTILITY, PluginType.MINIGAME, PluginType.MISCELLANEOUS, PluginType.GAMEMODE, PluginType.UNCATEGORIZED);
private static final Comparator<PluginListItem> categoryComparator = Comparator.comparing(plugin -> definedOrder.indexOf(plugin.getPluginType()));
private final ConfigManager configManager;
@@ -187,7 +187,7 @@ public class PluginListPanel extends PluginPanel
{
pluginList.forEach(listItem ->
{
if (listItem.getPluginType() == PluginType.IMPORTANT)
if (listItem.getPluginType() == PluginType.SYSTEM)
{
return;
}
@@ -692,7 +692,7 @@ public class PluginListPanel extends PluginPanel
return openOSRSConfig.minigameColor();
case GAMEMODE:
return openOSRSConfig.gamemodeColor();
case IMPORTANT:
case SYSTEM:
return Color.WHITE;
}
@@ -716,4 +716,4 @@ public class PluginListPanel extends PluginPanel
pluginList.sort(Comparator.comparing(ev -> ev.getPluginConfig().getName()));
}
}
}
}