mirror of
https://git.tonybark.com/tonytins/CyberBits.git
synced 2026-06-28 12:13:36 -04:00
WIP UI refractor
Swapped stack panels for using the grid's rows. Unfortunately, this is causing some height problems.
This commit is contained in:
parent
71cc94e251
commit
77cc3b4364
2 changed files with 72 additions and 72 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
<Window xmlns="https://github.com/avaloniaui"
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:vm="using:CyberBits.ViewModels"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:vm="using:CyberBits.ViewModels"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="530"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="530"
|
||||||
Width="800" Height="530" CanResize="False"
|
Width="800" Height="530" CanResize="False"
|
||||||
ExtendClientAreaToDecorationsHint="True"
|
ExtendClientAreaToDecorationsHint="True"
|
||||||
|
|
@ -26,68 +26,72 @@
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
<Grid ColumnDefinitions="*,*" HorizontalAlignment="Center">
|
<Grid ColumnDefinitions="*,*" HorizontalAlignment="Center">
|
||||||
|
<!-- Left column: Image -->
|
||||||
<Image x:Name="BitsImage" Grid.Column="0" Source="avares://CyberBits/Assets/cock.jpg" />
|
<Image x:Name="BitsImage" Grid.Column="0" Source="avares://CyberBits/Assets/cock.jpg" />
|
||||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
|
||||||
<StackPanel Grid.Column="1">
|
<!-- Right column: main content grid (replaces the two StackPanels) -->
|
||||||
<Grid ColumnDefinitions="200,180">
|
<Grid Grid.Column="1"
|
||||||
<GridSplitter ResizeDirection="Columns"/>
|
RowDefinitions="Auto,Auto,Auto,*,*,*"
|
||||||
<StackPanel Grid.Column="0" >
|
ColumnDefinitions="200,Auto,180">
|
||||||
<ComboBox ItemsSource="{Binding GenitalOptions}"
|
|
||||||
SelectedItem="{Binding SelectedBits}"
|
<!-- First column (200px) – Bit selection and model lists -->
|
||||||
PlaceholderText="Genitals"
|
<ComboBox Grid.Row="0" Grid.Column="0"
|
||||||
Width="120"
|
Width="120"
|
||||||
HorizontalContentAlignment="Center"
|
HorizontalContentAlignment="Center"
|
||||||
SelectedValue="0"
|
SelectedValue="0"
|
||||||
x:Name="BitSelection"
|
x:Name="BitSelection"
|
||||||
|
PlaceholderText="Genitals"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
SelectionChanged="SelectedBitsControl_OnSelectionChanged"
|
|
||||||
Margin="5" />
|
Margin="5" />
|
||||||
<ListBox ItemsSource="{Binding ModelsList}"
|
|
||||||
|
<ListBox Grid.Row="1" Grid.Column="0"
|
||||||
|
ItemsSource="{Binding ModelsList}"
|
||||||
SelectedItem="{Binding SelectedModels}"
|
SelectedItem="{Binding SelectedModels}"
|
||||||
Name="ModelItems"
|
Name="ModelItems"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Height="110" />
|
Height="110" />
|
||||||
<Border Height="10" />
|
|
||||||
<TextBlock Text="Pubes" HorizontalAlignment="Center" />
|
<ListBox Grid.Row="2" Grid.Column="0"
|
||||||
<ListBox ItemsSource="{Binding PubesList}"
|
|
||||||
SelectedItem="{Binding SelectedPubes}"
|
|
||||||
Name="PubesItems"
|
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Height="110" />
|
Height="110" />
|
||||||
<TextBlock Name="ExtrasText" Text="Balls" HorizontalAlignment="Center" />
|
<TextBlock Name="ExtrasText" Grid.Row="3" Grid.Column="0" Text="Balls" />
|
||||||
<ListBox
|
<ListBox Grid.Row="4" Grid.Column="0"
|
||||||
ItemsSource="{Binding ExtrasList}"
|
ItemsSource="{Binding ExtrasList}"
|
||||||
SelectedItem="{Binding SelectedExtras}"
|
SelectedItem="{Binding SelectedExtras}"
|
||||||
Name="ExtraItems"
|
Name="ExtraItems"
|
||||||
Margin="5"
|
Height="110" />
|
||||||
Height="110"
|
|
||||||
/>
|
<!-- Splitter between the two inner columns -->
|
||||||
</StackPanel>
|
<GridSplitter Grid.Row="0" Grid.RowSpan="4"
|
||||||
<GridSplitter Grid.Column="1" ResizeDirection="Columns"/>
|
Grid.Column="1"
|
||||||
<StackPanel Grid.Column="1">
|
ResizeDirection="Columns" />
|
||||||
<TextBlock Text="Aesthetics" HorizontalAlignment="Center" />
|
|
||||||
<ListBox ItemsSource="{Binding AestheticsList}"
|
<!-- Second column – Aesthetics, Cyberware, etc. -->
|
||||||
|
<TextBlock Grid.Row="0" Grid.Column="2"
|
||||||
|
Text="Aesthetics"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
|
||||||
|
<ListBox Grid.Row="1" Grid.Column="2"
|
||||||
|
ItemsSource="{Binding AestheticsList}"
|
||||||
SelectedItem="{Binding SelectedAesthetics}"
|
SelectedItem="{Binding SelectedAesthetics}"
|
||||||
Name="AestheticsItems"
|
Name="AestheticsItems"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Height="110" />
|
Height="110" />
|
||||||
<Border Height="10" />
|
|
||||||
<TextBlock Text="Cyberware" HorizontalAlignment="Center" />
|
<TextBlock Grid.Row="2" Grid.Column="2"
|
||||||
<ListBox ItemsSource="{Binding CyberwareList}"
|
Text="Cyberware"
|
||||||
|
HorizontalAlignment="Center" />
|
||||||
|
|
||||||
|
<ListBox Grid.Row="3" Grid.Column="2"
|
||||||
|
ItemsSource="{Binding CyberwareList}"
|
||||||
SelectedItem="{Binding SelectedCyberware}"
|
SelectedItem="{Binding SelectedCyberware}"
|
||||||
Name="CyberwareItems"
|
Name="CyberwareItems"
|
||||||
|
Height="110" />
|
||||||
|
<TextBlock Grid.Row="4" Grid.Column="2" Text="Butts" />
|
||||||
|
<ListBox Grid.Row="5" Grid.Column="2"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Height="110" />
|
Height="110" />
|
||||||
<TextBlock Text="Butt" HorizontalAlignment="Center" />
|
|
||||||
<ListBox ItemsSource="{Binding ButtsList}"
|
|
||||||
SelectedItem="{Binding SelectedButt}"
|
|
||||||
Name="ButtOptions"
|
|
||||||
Margin="5"
|
|
||||||
Height="110"
|
|
||||||
/>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Border Margin="2" VerticalAlignment="Bottom">
|
<Border Margin="2" VerticalAlignment="Bottom">
|
||||||
<TextBlock HorizontalAlignment="Right" Name="VersionBox" Margin="10" Text="v0.1.100" />
|
<TextBlock HorizontalAlignment="Right" Name="VersionBox" Margin="10" Text="v0.1.100" />
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace CyberBits.Views;
|
||||||
|
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
private string? AppPath => Path.GetDirectoryName(Assembly.GetAssembly(typeof(MainWindow))?.Location);
|
private static string? AppPath => Path.GetDirectoryName(Assembly.GetAssembly(typeof(MainWindow))?.Location);
|
||||||
|
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
|
|
@ -18,11 +18,10 @@ public partial class MainWindow : Window
|
||||||
var commonFile = File.ReadAllText($"{AppPath}//{DataFiles.COMMON_JSON}");
|
var commonFile = File.ReadAllText($"{AppPath}//{DataFiles.COMMON_JSON}");
|
||||||
var commonData = JsonSerializer.Deserialize<UniversalModel>(commonFile);
|
var commonData = JsonSerializer.Deserialize<UniversalModel>(commonFile);
|
||||||
|
|
||||||
PubesItems.ItemsSource = commonData?.Pubes;
|
/*PubesItems.ItemsSource = commonData?.Pubes;
|
||||||
CyberwareItems.ItemsSource = commonData?.Cyberware;
|
CyberwareItems.ItemsSource = commonData?.Cyberware;
|
||||||
AestheticsItems.ItemsSource = commonData?.Aesthetic;
|
AestheticsItems.ItemsSource = commonData?.Aesthetic;
|
||||||
ButtOptions.ItemsSource = commonData?.Butt;
|
ButtOptions.ItemsSource = commonData?.Butt;*/
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
@ -35,12 +34,10 @@ public partial class MainWindow : Window
|
||||||
#else
|
#else
|
||||||
VersionBox.Text = AppConsts.VERSION;
|
VersionBox.Text = AppConsts.VERSION;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GenitalSwap(string image, string data)
|
private void GenitalSwap(string image, string data)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var genitalFile = File.ReadAllText($"{AppPath}//{data}");
|
var genitalFile = File.ReadAllText($"{AppPath}//{data}");
|
||||||
|
|
@ -56,7 +53,6 @@ public partial class MainWindow : Window
|
||||||
Console.WriteLine(e);
|
Console.WriteLine(e);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectedBitsControl_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void SelectedBitsControl_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue