Skip to content

Commit

Permalink
Hide updater button in non-debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
colinator27 committed Aug 11, 2024
1 parent f3afdf3 commit 7944d8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion UndertaleModTool/Windows/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

<Separator Grid.Row="18" Grid.ColumnSpan="4" Margin="10"/>
<local:ButtonDark Grid.Row="19" Grid.Column="0" Grid.ColumnSpan="1" Margin="5" Click="AppDataButton_Click">Open application data folder</local:ButtonDark>
<local:ButtonDark Grid.Row="19" Grid.Column="2" Grid.ColumnSpan="2" Margin="5" Click="UpdateAppButton_Click" x:Name="UpdateAppButton" HorizontalAlignment="Right" Width="223">Update app to latest commit</local:ButtonDark>
<local:ButtonDark Grid.Row="19" Grid.Column="2" Grid.ColumnSpan="2" Margin="5" Click="UpdateAppButton_Click" x:Name="UpdateAppButton" HorizontalAlignment="Right" Width="223" Visibility="{Binding UpdaterButtonVisibility}">Update app to latest commit</local:ButtonDark>
</Grid>
</ScrollViewer>
</Window>
6 changes: 6 additions & 0 deletions UndertaleModTool/Windows/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ public bool UpdateButtonEnabled
set => UpdateAppButton.IsEnabled = value;
}

#if DEBUG
public static Visibility UpdaterButtonVisibility => Visibility.Visible;
#else
public static Visibility UpdaterButtonVisibility => Visibility.Hidden;
#endif

public SettingsWindow()
{
InitializeComponent();
Expand Down

0 comments on commit 7944d8e

Please sign in to comment.