Fix some things in item unlocks. Add unlock cheatcodes to default configuration.

This commit is contained in:
Ottermandias 2023-07-13 19:33:28 +02:00
parent 51bfcd1136
commit 9910b17ab0
8 changed files with 115 additions and 37 deletions

View file

@ -77,14 +77,14 @@ public class SettingsTab : ITab
private void DrawCodes()
{
if (!ImGui.CollapsingHeader("Codes"))
if (!ImGui.CollapsingHeader("Cheat Codes"))
return;
using (var style = ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, ImGuiHelpers.GlobalScale, _currentCode.Length > 0))
{
var color = _codeService.CheckCode(_currentCode) != null ? ColorId.ActorAvailable : ColorId.ActorUnavailable;
using var c = ImRaii.PushColor(ImGuiCol.Border, color.Value(), _currentCode.Length > 0);
if (ImGui.InputTextWithHint("##Code", "Enter Code...", ref _currentCode, 512, ImGuiInputTextFlags.EnterReturnsTrue))
if (ImGui.InputTextWithHint("##Code", "Enter Cheat Code...", ref _currentCode, 512, ImGuiInputTextFlags.EnterReturnsTrue))
if (_codeService.AddCode(_currentCode))
_currentCode = string.Empty;
}