ui changes for modularity and npc generation

This commit is contained in:
grimsace
2026-06-30 10:43:15 -05:00
parent b178513870
commit 6520e215ba
3 changed files with 34 additions and 30 deletions
+10 -30
View File
@@ -48,38 +48,18 @@
ItemsSource="{Binding Categories}"
SelectedItem="{Binding SelectedCategory}"/>
<Label Content="Name:"/>
<TextBox Text="{Binding Name}" PlaceholderText="Enter name..."/>
<StackPanel IsVisible="{Binding IsNpcSelected}" Spacing="10">
<Label Content="Name:"/>
<TextBox Text="{Binding Name}" PlaceholderText="Enter name..."/>
<Label Content="Description:"/>
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="100" PlaceholderText="Enter description here..."/>
<Label Content="Level:"/>
<ComboBox HorizontalAlignment="Stretch"
ItemsSource="{Binding Levels}"
SelectedItem="{Binding SelectedLevel}"/>
<Label Content="Images:"/>
<ScrollViewer Height="180">
<ItemsControl ItemsSource="{Binding ImageItems}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="5">
<Border BorderBrush="Gray" BorderThickness="1" CornerRadius="4" ClipToBounds="True">
<Image Source="{Binding Thumbnail}" Width="100" Height="100" Stretch="UniformToFill" />
</Border>
<Button Content="X"
Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).RemoveImageCommand}"
CommandParameter="{Binding}"
HorizontalAlignment="Right" VerticalAlignment="Top"
Background="#80000000" Foreground="White" Padding="5,2"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<Button Content="Select Image" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Click="SelectImage_Click"/>
<Label Content="Description:"/>
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="100" PlaceholderText="Enter description here..."/>
</StackPanel>
<Button Content="Generate" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
Command="{Binding GenerateCommand}" FontWeight="Bold"/>