Skip to content

Commit

Permalink
Add GP Controls to Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
benrick committed May 16, 2020
1 parent c49cfbf commit 8ae4f12
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/InteractiveSeven.Core/Settings/PlayerGpSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{
public class PlayerGpSettings : ObservableSettingsBase
{
private int _giveMultiplier = 100;
private int _removeMultiplier = 100;
private ushort _giveMultiplier = 100;
private ushort _removeMultiplier = 100;
private bool _allowModOverride = true;
private bool _giveGpEnabled = false;
private bool _removeGpEnabled = false;

public bool GiveGpEnabled // TODO: Add to UI
public bool GiveGpEnabled
{
get => _giveGpEnabled;
set
Expand All @@ -17,7 +17,7 @@ public class PlayerGpSettings : ObservableSettingsBase
OnPropertyChanged();
}
}
public bool RemoveGpEnabled // TODO: Add to UI
public bool RemoveGpEnabled
{
get => _removeGpEnabled;
set
Expand All @@ -26,7 +26,7 @@ public class PlayerGpSettings : ObservableSettingsBase
OnPropertyChanged();
}
}
public int GiveMultiplier // TODO: Add to UI
public ushort GiveMultiplier
{
get => _giveMultiplier;
set
Expand All @@ -35,7 +35,7 @@ public class PlayerGpSettings : ObservableSettingsBase
OnPropertyChanged();
}
}
public int RemoveMultiplier // TODO: Add to UI
public ushort RemoveMultiplier
{
get => _removeMultiplier;
set
Expand All @@ -44,7 +44,7 @@ public class PlayerGpSettings : ObservableSettingsBase
OnPropertyChanged();
}
}
public bool AllowModOverride // TODO: Add to UI
public bool AllowModOverride
{
get => _allowModOverride;
set
Expand Down
65 changes: 65 additions & 0 deletions src/InteractiveSeven/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,70 @@
</ScrollViewer>
</TabItem>

<TabItem DataContext="{Binding EquipmentSettings.PlayerGpSettings}">
<TabItem.Header>
<StackPanel Style="{StaticResource TabHeaderStyle}">
<iconPacks:PackIconMaterial Margin="2 0 4 0" Kind="Balloon" />
<TextBlock Text="Gold Saucer" />
</StackPanel>
</TabItem.Header>
<ScrollViewer>
<StackPanel Orientation="Vertical">
<GroupBox Header="GP" Margin="5">
<Grid Margin="5,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<CheckBox Grid.Row="0" Grid.Column="0" Width="75"
IsChecked="{Binding Path=GiveGpEnabled, Mode=TwoWay}" />
<Label Grid.Row="0" Grid.Column="1"
Content="Enable Giving GP"
FontSize="12" Margin="5,0,0,0" />

<mah:NumericUpDown Grid.Row="1" Grid.Column="0"
Width="75" Minimum="0"
Interval="10" Maximum="65535"
IsEnabled="{Binding GiveGpEnabled}"
Value="{Binding Path=GiveMultiplier, Mode=TwoWay}" />
<Label Grid.Row="1" Grid.Column="1"
Content="Gil Cost Per GP Added"
FontSize="12" Margin="5,0,0,0" />

<CheckBox Grid.Row="2" Grid.Column="0" Width="75"
IsChecked="{Binding Path=RemoveGpEnabled, Mode=TwoWay}" />
<Label Grid.Row="2" Grid.Column="1"
Content="Enable Removing GP"
FontSize="12" Margin="5,0,0,0" />

<mah:NumericUpDown Grid.Row="3" Grid.Column="0"
Width="75" Minimum="100"
Interval="10" Maximum="65535"
IsEnabled="{Binding RemoveGpEnabled}"
Value="{Binding Path=RemoveMultiplier, Mode=TwoWay}" />
<Label Grid.Row="3" Grid.Column="1"
Content="Gil Cost Per GP Removed"
FontSize="12" Margin="5,0,0,0" />

<CheckBox Grid.Row="4" Grid.Column="0" Width="75"
IsChecked="{Binding Path=AllowModOverride, Mode=TwoWay}" />
<Label Grid.Row="4" Grid.Column="1"
Content="Allow Mods to Avoid Costs"
FontSize="12" Margin="5,0,0,0" />
</Grid>
</GroupBox>
</StackPanel>
</ScrollViewer>
</TabItem>

<TabItem DataContext="{Binding ItemSettings.AllItems}">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
Expand Down Expand Up @@ -823,6 +887,7 @@
</DataGrid>
</GroupBox>
</TabItem>

</TabControl>

</GroupBox>
Expand Down

0 comments on commit 8ae4f12

Please sign in to comment.