Skip to content

Commit

Permalink
Fixes for background and label after selecting image
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoBob committed May 26, 2022
1 parent 25b494a commit 0e46a5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion RenderWarePreviewer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
</Button>
</StackPanel>
<StackPanel Name="SelectImageStackPanel" Margin="5, 20, 5, 0">
<Label Name="ImagePathLabel"></Label>
<Label Foreground="white">
<Label.Content>
<AccessText Name="ImagePathLabel" TextWrapping="Wrap"/>
</Label.Content>
</Label>
<Button BorderBrush="#34495E" Background="#34495E" Foreground="White" Height="30" Click="SelectTargetFile">Select Image File
<Button.Resources>
<Style TargetType="Border">
Expand Down
2 changes: 1 addition & 1 deletion RenderWarePreviewer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void SelectTargetFile(object sender, RoutedEventArgs e)
if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK)
return;

this.ImagePathLabel.Content = dialog.FileName;
this.ImagePathLabel.Text = dialog.FileName;
UpdatePedTexture(dialog.FileName);

this.watcher = new FileSystemWatcher()
Expand Down
2 changes: 2 additions & 0 deletions RenderWarePreviewer/Scenes/SceneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public void LoadModel(Ped ped, Image<Rgba32> image, string imageName)

var rotation = DetermineRotation(models);
this.scene.Clear();
LoadBackgroundModels();

foreach (var model in models)
this.scene.Add(model, new Vector3D(0, 0, 0), rotation);
}
Expand Down

0 comments on commit 0e46a5e

Please sign in to comment.