-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added Savingthrow Types - Added Ranged Damage Types - Added Ammunitions - Added VFX columns from damagehitvisual to Damage Types - Fixed dispaly of DamageType groups in UI - Fixed Itemproperty Table and CostTable Grids not displaying data correctly and not saving changed correctly
- Loading branch information
Showing
48 changed files
with
2,156 additions
and
38 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
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,39 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="using:Eos.Usercontrols" | ||
xmlns:repo="using:Eos.Repositories" | ||
xmlns:nwn="using:Eos.Nwn" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Eos.Usercontrols.AmmunitionComboBox" | ||
x:Name="ucAmmunitionComboBox"> | ||
<UserControl.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceInclude Source="/Assets/ConverterResources.axaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</UserControl.Resources> | ||
|
||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:AmmunitionComboBox}}}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="auto"/> | ||
<ColumnDefinition Width="auto"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Button x:Name="cbAmmunitions" Grid.Column="0" Click="btSearch_Click" HorizontalContentAlignment="Stretch" MinHeight="22"> | ||
<Button.Content> | ||
<TextBlock Text="{Binding ElementName=ucAmmunitionComboBox, Path=SelectedValue.Name, Mode=OneWay}" Margin="3,0,0,0"/> | ||
</Button.Content> | ||
</Button> | ||
|
||
<Button x:Name="btClear" Grid.Column="1" Content="🞪" Click="btClear_Click" Margin="2,0,0,0" | ||
Height="{Binding ElementName=cbAmmunitions, Path=Bounds.Height}" Width="{Binding ElementName=cbAmmunitions, Path=Bounds.Height}" | ||
IsVisible="{Binding ElementName=ucAmmunitionComboBox, Path=IsNullable}"/> | ||
<!--<local:ResetIsEnabled >--> | ||
<Button x:Name="btGoto" Grid.Column="2" Margin="2,0,0,0" Content="👁" Click="btGoto_Click" Height="{Binding ElementName=cbAmmunitions, Path=Bounds.Height}" Width="{Binding ElementName=cbAmmunitions, Path=Bounds.Height}"/> | ||
<!--</local:ResetIsEnabled>--> | ||
</Grid> | ||
</UserControl> |
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,53 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Interactivity; | ||
using Eos.Models; | ||
using Eos.Repositories; | ||
using Eos.Services; | ||
using Eos.ViewModels.Base; | ||
using Eos.ViewModels.Dialogs; | ||
using System.Threading.Tasks; | ||
|
||
namespace Eos.Usercontrols | ||
{ | ||
public partial class AmmunitionComboBox : UserControl | ||
{ | ||
public AmmunitionComboBox() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public static readonly StyledProperty<Ammunition?> SelectedValueProperty = AvaloniaProperty.Register<AmmunitionComboBox, Ammunition?>("SelectedValue", null, false, Avalonia.Data.BindingMode.TwoWay); | ||
public static readonly StyledProperty<bool> IsNullableProperty = AvaloniaProperty.Register<AmmunitionComboBox, bool>("IsNullable", true); | ||
|
||
public Ammunition? SelectedValue | ||
{ | ||
get { return GetValue(SelectedValueProperty); } | ||
set { SetValue(SelectedValueProperty, value); } | ||
} | ||
|
||
public bool IsNullable | ||
{ | ||
get { return GetValue(IsNullableProperty); } | ||
set { SetValue(IsNullableProperty, value); } | ||
} | ||
|
||
private void btClear_Click(object sender, RoutedEventArgs e) | ||
{ | ||
SetValue(SelectedValueProperty, null); | ||
} | ||
|
||
private void btSearch_Click(object sender, RoutedEventArgs e) | ||
{ | ||
var viewModel = new AmmunitionSearchViewModel(MasterRepository.Ammunitions); | ||
WindowService.OpenDialog(viewModel); | ||
if (viewModel.ResultModel != null) | ||
SetValue(SelectedValueProperty, viewModel.ResultModel); | ||
} | ||
|
||
private void btGoto_Click(object sender, RoutedEventArgs e) | ||
{ | ||
MessageDispatcher.Send(MessageType.OpenDetail, SelectedValue, true); | ||
} | ||
} | ||
} |
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,39 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="using:Eos.Usercontrols" | ||
xmlns:repo="using:Eos.Repositories" | ||
xmlns:nwn="using:Eos.Nwn" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Eos.Usercontrols.RangedDamageTypeComboBox" | ||
x:Name="ucRangedDamageTypeComboBox"> | ||
<UserControl.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceInclude Source="/Assets/ConverterResources.axaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
</ResourceDictionary> | ||
</UserControl.Resources> | ||
|
||
<Grid DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:RangedDamageTypeComboBox}}}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*"/> | ||
<ColumnDefinition Width="auto"/> | ||
<ColumnDefinition Width="auto"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Button x:Name="cbRangedDamageTypes" Grid.Column="0" Click="btSearch_Click" HorizontalContentAlignment="Stretch" MinHeight="22"> | ||
<Button.Content> | ||
<TextBlock Text="{Binding ElementName=ucRangedDamageTypeComboBox, Path=SelectedValue.Name, Mode=OneWay}" Margin="3,0,0,0"/> | ||
</Button.Content> | ||
</Button> | ||
|
||
<Button x:Name="btClear" Grid.Column="1" Content="🞪" Click="btClear_Click" Margin="2,0,0,0" | ||
Height="{Binding ElementName=cbRangedDamageTypes, Path=Bounds.Height}" Width="{Binding ElementName=cbRangedDamageTypes, Path=Bounds.Height}" | ||
IsVisible="{Binding ElementName=ucRangedDamageTypeComboBox, Path=IsNullable}"/> | ||
<!--<local:ResetIsEnabled >--> | ||
<Button x:Name="btGoto" Grid.Column="2" Margin="2,0,0,0" Content="👁" Click="btGoto_Click" Height="{Binding ElementName=cbRangedDamageTypes, Path=Bounds.Height}" Width="{Binding ElementName=cbRangedDamageTypes, Path=Bounds.Height}"/> | ||
<!--</local:ResetIsEnabled>--> | ||
</Grid> | ||
</UserControl> |
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,53 @@ | ||
using Avalonia; | ||
using Avalonia.Controls; | ||
using Avalonia.Interactivity; | ||
using Eos.Models; | ||
using Eos.Repositories; | ||
using Eos.Services; | ||
using Eos.ViewModels.Base; | ||
using Eos.ViewModels.Dialogs; | ||
using System.Threading.Tasks; | ||
|
||
namespace Eos.Usercontrols | ||
{ | ||
public partial class RangedDamageTypeComboBox : UserControl | ||
{ | ||
public RangedDamageTypeComboBox() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
public static readonly StyledProperty<RangedDamageType?> SelectedValueProperty = AvaloniaProperty.Register<RangedDamageTypeComboBox, RangedDamageType?>("SelectedValue", null, false, Avalonia.Data.BindingMode.TwoWay); | ||
public static readonly StyledProperty<bool> IsNullableProperty = AvaloniaProperty.Register<RangedDamageTypeComboBox, bool>("IsNullable", true); | ||
|
||
public RangedDamageType? SelectedValue | ||
{ | ||
get { return GetValue(SelectedValueProperty); } | ||
set { SetValue(SelectedValueProperty, value); } | ||
} | ||
|
||
public bool IsNullable | ||
{ | ||
get { return GetValue(IsNullableProperty); } | ||
set { SetValue(IsNullableProperty, value); } | ||
} | ||
|
||
private void btClear_Click(object sender, RoutedEventArgs e) | ||
{ | ||
SetValue(SelectedValueProperty, null); | ||
} | ||
|
||
private void btSearch_Click(object sender, RoutedEventArgs e) | ||
{ | ||
var viewModel = new RangedDamageTypeSearchViewModel(MasterRepository.RangedDamageTypes); | ||
WindowService.OpenDialog(viewModel); | ||
if (viewModel.ResultModel != null) | ||
SetValue(SelectedValueProperty, viewModel.ResultModel); | ||
} | ||
|
||
private void btGoto_Click(object sender, RoutedEventArgs e) | ||
{ | ||
MessageDispatcher.Send(MessageType.OpenDetail, SelectedValue, true); | ||
} | ||
} | ||
} |
Oops, something went wrong.