Rolls settings fundumentals setup

This commit is contained in:
2025-12-29 14:25:10 +01:00
parent d00e82a96f
commit aa7553d9f9

View File

@@ -20,6 +20,12 @@ public class SettingsWindow : Window, IDisposable
private bool maxBetFormatValid = true; private bool maxBetFormatValid = true;
private bool stepFormatValid = true; private bool stepFormatValid = true;
// todo proper implementation it's just a placeholder
private bool NoTempRolls => true;
private Roll? new_roll;
private (uint min, uint max) rollInterval = (1, 999);
public SettingsWindow(Plugin plugin) : base("Settings###HRC Settings") public SettingsWindow(Plugin plugin) : base("Settings###HRC Settings")
{ {
Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar | Flags = ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoScrollbar |
@@ -42,12 +48,18 @@ public class SettingsWindow : Window, IDisposable
// todo set up multiplier, roll, color, etc // todo set up multiplier, roll, color, etc
// todo add button for rolls // todo add button for rolls
if (ImGui.Button("Add roll")) { } if (ImGui.Button("Add roll") && NoTempRolls)
foreach (var roll in settings.rolls)
{ {
// ImGui.BeginTable(); // TODO no new rolls must be there
ImGui.EndTable();
}
if (ImGui.CollapsingHeader("Rolls###settings", ImGuiTreeNodeFlags.DefaultOpen))
{
// todo here we put new rolls
foreach (var roll in settings.rolls)
{
// todo here we put existing rolls
}
} }
var maxbetValid = NewInput("max_bet_label", "Max bet", "max_bet_text", ref settings.maxBet); var maxbetValid = NewInput("max_bet_label", "Max bet", "max_bet_text", ref settings.maxBet);
@@ -79,7 +91,7 @@ public class SettingsWindow : Window, IDisposable
} }
private bool? NewInput(string labelId, string labelText, string inputId, ref uint? result) private static bool? NewInput(string labelId, string labelText, string inputId, ref uint? result)
{ {
bool? valid = null; bool? valid = null;