-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Setup release 0.9.9.17 * Save extracted minimap window position (#591) Closes #590 * Add ability to pin minimap to screen Closes #585 * Fix ObjectDisposedException Closes #589
- Loading branch information
1 parent
2863032
commit 3d9106a
Showing
9 changed files
with
191 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Daybreak.Attributes; | ||
|
||
namespace Daybreak.Configuration.Options; | ||
|
||
[OptionsIgnore] | ||
[OptionsName(Name = "Minimap Window")] | ||
[OptionsSynchronizationIgnore] | ||
public sealed class MinimapWindowOptions | ||
{ | ||
public double X { get; set; } | ||
public double Y { get; set; } | ||
public double Width { get; set; } | ||
public double Height { get; set; } | ||
public double DpiX { get; set; } | ||
public double DpiY { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<UserControl x:Class="Daybreak.Controls.Glyphs.PinGlyph" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:Daybreak.Controls.Glyphs" | ||
x:Name="_this" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
<Viewbox> | ||
<Grid> | ||
<Path Fill="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}" | ||
Data="m15.0058,27.53079a1,1 0 0 1 -0.71,-0.29l-11.53,-11.53a1,1 0 0 1 0,-1.42l1.52,-1.51a6.06,6.06 0 0 1 6.37,-1.43l5.41,-5.41l-0.94,-0.94a1,1 0 0 1 0,-1.41l3.29,-3.3a1,1 0 0 1 1.41,0l9.89,9.89a1,1 0 0 1 0,1.41l-3.3,3.29a1,1 0 0 1 -1.41,0l-0.94,-0.94l-5.41,5.41a6.08,6.08 0 0 1 -1.43,6.37l-1.51,1.52a1,1 0 0 1 -0.71,0.29zm-10.12,-12.53l10.12,10.12l0.81,-0.81a4.12,4.12 0 0 0 0.77,-4.75a1,1 0 0 1 0.18,-1.15l6.59,-6.59a1,1 0 0 1 1.42,0l0.94,0.94l1.88,-1.88l-8.47,-8.47l-1.88,1.88l0.94,0.94a1,1 0 0 1 0,1.42l-6.59,6.59a1,1 0 0 1 -1.15,0.18a4.12,4.12 0 0 0 -4.75,0.77l-0.81,0.81z"/> | ||
<Path Fill="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}" | ||
Data="m1.0058,30.00079a1,1 0 0 1 -0.71,-0.29a1,1 0 0 1 0,-1.42l8.24,-8.23a1,1 0 0 1 1.41,1.41l-8.23,8.24a1,1 0 0 1 -0.71,0.29z"/> | ||
<Path Fill="{Binding ElementName=_this, Path=Foreground, Mode=OneWay}" | ||
Data="m24.0658,13.53079a1,1 0 0 1 -0.71,-0.29l-2.47,-2.47a1,1 0 1 1 1.42,-1.42l2.47,2.47a1,1 0 0 1 0,1.42a1,1 0 0 1 -0.71,0.29z"/> | ||
</Grid> | ||
</Viewbox> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace Daybreak.Controls.Glyphs; | ||
/// <summary> | ||
/// Interaction logic for PinGlyph.xaml | ||
/// </summary> | ||
public partial class PinGlyph : UserControl | ||
{ | ||
public PinGlyph() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<mah:MetroWindow x:Class="Daybreak.Launch.MinimapWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:Daybreak.Launch" | ||
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" | ||
xmlns:buttons="clr-namespace:Daybreak.Controls.Buttons" | ||
xmlns:glyphs="clr-namespace:Daybreak.Controls.Glyphs" | ||
xmlns:launch="clr-namespace:Daybreak.Launch" | ||
mc:Ignorable="d" | ||
WindowStyle="None" | ||
ResizeMode="CanResize" | ||
ShowTitleBar="False" | ||
ShowMaxRestoreButton="True" | ||
ShowIconOnTitleBar="False" | ||
ShowMinButton="True" | ||
ShowSystemMenu="False" | ||
ShowSystemMenuOnRightClick="False" | ||
ShowInTaskbar="True" | ||
ShowCloseButton="True" | ||
Title="Daybreak Minimap" | ||
Topmost="{Binding ElementName=_this, Path=Pinned, Mode=OneWay}" | ||
x:Name="_this" | ||
Height="450" Width="800"> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="30" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<Rectangle Height="30" | ||
VerticalAlignment="Stretch" | ||
HorizontalAlignment="Stretch" | ||
Grid.Row="0" | ||
MouseLeftButtonDown="Grid_MouseLeftButtonDown" /> | ||
<buttons:HighlightButton Height="30" | ||
Width="50" | ||
Margin="0, 0, 140, 0" | ||
HighlightColor="LightGray" | ||
HorizontalAlignment="Right" | ||
Clicked="HighlightButton_Clicked" | ||
Cursor="Arrow" | ||
ToolTip="Pin Topmost"> | ||
<buttons:HighlightButton.ButtonContent> | ||
<Grid> | ||
<glyphs:PinGlyph Foreground="{StaticResource MahApps.Brushes.ThemeForeground}" | ||
Height="15"/> | ||
<Line X1="21" | ||
X2="31" | ||
Y1="10" | ||
Y2="20" | ||
StrokeThickness="1" | ||
Stroke="{StaticResource MahApps.Brushes.ThemeForeground}" | ||
Visibility="{Binding Path=Pinned, RelativeSource={RelativeSource AncestorType={x:Type launch:MinimapWindow}}, Converter={StaticResource BooleanToVisibilityConverter}}"/> | ||
</Grid> | ||
|
||
</buttons:HighlightButton.ButtonContent> | ||
</buttons:HighlightButton> | ||
<ContentPresenter Grid.Row="1" | ||
Content="{Binding ElementName=_this, Path=Content, Mode=OneWay}"/> | ||
</Grid> | ||
</mah:MetroWindow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using MahApps.Metro.Controls; | ||
using System.Windows; | ||
using System.Windows.Extensions; | ||
|
||
namespace Daybreak.Launch; | ||
/// <summary> | ||
/// Interaction logic for MinimapWindow.xaml | ||
/// </summary> | ||
public partial class MinimapWindow : MetroWindow | ||
{ | ||
[GenerateDependencyProperty] | ||
private bool pinned = false; | ||
[GenerateDependencyProperty] | ||
private FrameworkElement content = default!; | ||
|
||
public MinimapWindow() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void Grid_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) | ||
{ | ||
if (e.ChangedButton is System.Windows.Input.MouseButton.Left) | ||
{ | ||
e.Handled = true; | ||
this.DragMove(); | ||
} | ||
} | ||
|
||
private void HighlightButton_Clicked(object sender, System.EventArgs e) | ||
{ | ||
this.Pinned = !this.Pinned; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters