forked from ff-meli/OrchestrionPlugin
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using CheapLoc; | ||
using ImGuiNET; | ||
using Orchestrion.Audio; | ||
using Orchestrion.Persistence; | ||
using Orchestrion.Struct; | ||
|
||
namespace Orchestrion.UI.Windows.MainWindow; | ||
|
||
public partial class MainWindow | ||
{ | ||
private string _selectedDDPlaylist = ""; | ||
private void DrawDeepDungeonModeTab() | ||
{ | ||
ImGui.BeginChild("##ddmode"); | ||
DrawDeepDungeonModeSelector(); | ||
ImGui.EndChild(); | ||
} | ||
|
||
private void DrawDeepDungeonModeSelector() | ||
{ | ||
ImGui.Spacing(); | ||
|
||
var targetText = $"{SongList.Instance.GetSong(_tmpReplacement.TargetSongId).Id} - {SongList.Instance.GetSong(_tmpReplacement.TargetSongId).Name}"; | ||
string replacementText; | ||
if (_tmpReplacement.ReplacementId == SongReplacementEntry.NoChangeId) | ||
replacementText = _noChange; | ||
else | ||
replacementText = $"{SongList.Instance.GetSong(_tmpReplacement.ReplacementId).Id} - {SongList.Instance.GetSong(_tmpReplacement.ReplacementId).Name}"; | ||
|
||
// This fixes the ultra-wide combo boxes, I guess | ||
var width = ImGui.GetWindowWidth() * 0.60f; | ||
|
||
string allSongsLoc = Loc.Localize("DDPlaylistAll", "All Songs"); | ||
if (ImGui.BeginCombo(Loc.Localize("DDPlaylist", "Playlist"), _selectedDDPlaylist == "" ? allSongsLoc : _selectedDDPlaylist)) | ||
{ | ||
if (ImGui.Selectable(allSongsLoc)) | ||
{ | ||
_selectedDDPlaylist = ""; | ||
} | ||
foreach (var pInfo in Configuration.Instance.Playlists) | ||
{ | ||
var pName = pInfo.Key; | ||
if (ImGui.Selectable(pName)) | ||
{ | ||
_selectedDDPlaylist = pName; | ||
} | ||
} | ||
ImGui.EndCombo(); | ||
} | ||
var text = Loc.Localize("DDModeStart", "Start DD Mode"); | ||
if (ImGui.Button(text)) | ||
{ | ||
BGMManager.StartDeepDungeonMode(_selectedDDPlaylist); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters