Rolls settings fundumentals setup
This commit is contained in:
@@ -12,13 +12,19 @@ public class SettingsWindow : Window, IDisposable
|
|||||||
private const int Spacing = 5;
|
private const int Spacing = 5;
|
||||||
private const int InputWidth = 105;
|
private const int InputWidth = 105;
|
||||||
private const int InputMaxLen = 11;
|
private const int InputMaxLen = 11;
|
||||||
|
|
||||||
private const uint MaxAllowedGil = 999_999_999;
|
private const uint MaxAllowedGil = 999_999_999;
|
||||||
private readonly Configuration configuration;
|
private readonly Configuration configuration;
|
||||||
private Settings settings;
|
private Settings settings;
|
||||||
|
|
||||||
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")
|
||||||
{
|
{
|
||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user