Skip to content

Commit

Permalink
add settings path tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSav committed May 11, 2024
1 parent 2f4f828 commit f7b19ae
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## 0.0.10 (unreleased)
## 0.0.10 (11 May 2023)
- Add ability to display in italic items that cannot be obtained in the current save, because they depend on something else not avialable in the current save that the character does not currently have
- Changed to file-scoped namespaces
- Add setings path tooltip to the settings page about button

## 0.0.9 (10 May 2023)
- Small fix for adventure panel not updating
Expand Down
5 changes: 3 additions & 2 deletions Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Title="SettingsPage"
Name="settings"
d:DataContext="{d:DesignInstance local:SettingsPage,
IsDesignTimeCreatable=False}"
d:DesignHeight="800"
Expand Down Expand Up @@ -101,7 +102,7 @@
</Grid>
</StackPanel>
</ui:CardExpander>
<ui:CardExpander Margin="0,8,0,0" ExpandDirection="Down" IsExpanded="True">
<ui:CardExpander Margin="0,8,0,0" ExpandDirection="Down">
<ui:CardExpander.Header>
<Grid>
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -341,6 +342,6 @@

</StackPanel>
</ui:CardExpander>
<ui:Anchor Name="LinkToRepo" Margin="0,8,0,8" Content="{lex:Loc AboutRSG}" NavigateUri="/~https://github.com/AndrewSav/Remnant2SaveAnalyzer" />
<ui:Anchor Name="LinkToRepo" Margin="0,8,0,8" Content="{lex:Loc AboutRSG}" NavigateUri="/~https://github.com/AndrewSav/Remnant2SaveAnalyzer" ToolTip="{Binding ElementName=settings, Path=SettingsPathText}" PreviewMouseRightButtonDown="LinkToRepo_OnPreviewMouseRightButtonDown"/>
</StackPanel>
</ui:UiPage>
12 changes: 11 additions & 1 deletion Remnant2SaveAnalyzer/Views/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
using Wpf.Ui.Appearance;
using MessageBox = Wpf.Ui.Controls.MessageBox;
using Remnant2SaveAnalyzer.Logging;
using System.Configuration;
using System.Windows.Input;

namespace Remnant2SaveAnalyzer.Views.Pages;

Expand Down Expand Up @@ -415,5 +417,13 @@ private void СmbNoPrerequisiteItemColor_SelectionChanged(object sender, Selecti
{
Properties.Settings.Default.NoPrerequisiteItemStyle = ((ComboBoxItem)cmbNoPrerequisiteItemColor.SelectedItem).Tag.ToString();
}

private void LinkToRepo_OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
Clipboard.SetDataObject(SettingsPath);
}
// ReSharper disable UnusedMember.Global
public string SettingsPath => ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
public string SettingsPathText => Loc.T("Settings path (right click to copy)") + ": " + SettingsPath;

}
//string debug = System.Configuration.ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
9 changes: 9 additions & 0 deletions Remnant2SaveAnalyzer/locales/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Remnant2SaveAnalyzer/locales/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -597,4 +597,7 @@
<data name="Text_Italic" xml:space="preserve">
<value>Italic</value>
</data>
<data name="Settings path (right click to copy)" xml:space="preserve">
<value>Settings path (right click to copy)</value>
</data>
</root>

0 comments on commit f7b19ae

Please sign in to comment.