mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
feat: add settings window, add way to change general chat type
This commit is contained in:
parent
aa58d9258b
commit
5843dc8775
4 changed files with 107 additions and 1 deletions
|
|
@ -202,10 +202,12 @@ namespace Dalamud {
|
|||
private bool isImguiDrawDataWindow = false;
|
||||
private bool isImguiDrawPluginWindow = false;
|
||||
private bool isImguiDrawCreditsWindow = false;
|
||||
private bool isImguiDrawSettingsWindow = false;
|
||||
|
||||
private DalamudLogWindow logWindow;
|
||||
private DalamudDataWindow dataWindow;
|
||||
private DalamudCreditsWindow creditsWindow;
|
||||
private DalamudSettingsWindow settingsWindow;
|
||||
private PluginInstallerWindow pluginWindow;
|
||||
|
||||
private void BuildDalamudUi()
|
||||
|
|
@ -243,6 +245,10 @@ namespace Dalamud {
|
|||
if (ImGui.MenuItem("Open Credits window")) {
|
||||
OnOpenCreditsCommand(null, null);
|
||||
}
|
||||
if (ImGui.MenuItem("Open Settings window"))
|
||||
{
|
||||
OnOpenSettingsCommand(null, null);
|
||||
}
|
||||
ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow);
|
||||
if (ImGui.MenuItem("Dump ImGui info"))
|
||||
OnDebugImInfoCommand(null, null);
|
||||
|
|
@ -359,6 +365,11 @@ namespace Dalamud {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.isImguiDrawSettingsWindow)
|
||||
{
|
||||
this.isImguiDrawSettingsWindow = this.settingsWindow != null && this.settingsWindow.Draw();
|
||||
}
|
||||
|
||||
if (this.isImguiDrawDemoWindow)
|
||||
ImGui.ShowDemoWindow();
|
||||
}
|
||||
|
|
@ -447,6 +458,12 @@ namespace Dalamud {
|
|||
HelpMessage = Loc.Localize("DalamudLanguageHelp", "Set the language for the in-game addon and plugins that support it. Available languages: ") + Localization.ApplicableLangCodes.Aggregate("en", (current, code) => current + ", " + code)
|
||||
});
|
||||
|
||||
this.CommandManager.AddHandler("/xlsettings", new CommandInfo(OnOpenSettingsCommand)
|
||||
{
|
||||
HelpMessage = Loc.Localize("DalamudSettingsHelp", "Change various In-Game-Addon settings like chat channels and the discord bot setup."),
|
||||
ShowInHelp = false // Not quite ready yet
|
||||
});
|
||||
|
||||
this.CommandManager.AddHandler("/imdebug", new CommandInfo(OnDebugImInfoCommand)
|
||||
{
|
||||
HelpMessage = "ImGui DEBUG",
|
||||
|
|
@ -685,6 +702,12 @@ namespace Dalamud {
|
|||
this.Configuration.Save();
|
||||
}
|
||||
|
||||
private void OnOpenSettingsCommand(string command, string arguments)
|
||||
{
|
||||
this.settingsWindow = new DalamudSettingsWindow(this);
|
||||
this.isImguiDrawSettingsWindow = true;
|
||||
}
|
||||
|
||||
private int RouletteSlugToKey(string slug) => slug.ToLower() switch {
|
||||
"leveling" => 1,
|
||||
"506070" => 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue