From 0c491edb1be1524c98565069e7ca33bc1a3a5084 Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 11:53:56 -0800 Subject: [PATCH 01/84] Add settings control --- FluentAutoClicker/FluentAutoClicker.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/FluentAutoClicker/FluentAutoClicker.csproj b/FluentAutoClicker/FluentAutoClicker.csproj index 915ddf4..9bf72cb 100644 --- a/FluentAutoClicker/FluentAutoClicker.csproj +++ b/FluentAutoClicker/FluentAutoClicker.csproj @@ -36,6 +36,7 @@ + From b243c5defd4139750b61e30633180921401569dd Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 12:18:40 -0800 Subject: [PATCH 02/84] Add settings button --- FluentAutoClicker/MainPage.xaml | 45 ++++++++++++++++++++++++------ FluentAutoClicker/MainPage.xaml.cs | 7 +++++ 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/FluentAutoClicker/MainPage.xaml b/FluentAutoClicker/MainPage.xaml index 1a56715..2d3afba 100644 --- a/FluentAutoClicker/MainPage.xaml +++ b/FluentAutoClicker/MainPage.xaml @@ -3,6 +3,7 @@ x:Class="FluentAutoClicker.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> @@ -82,6 +83,7 @@ x:Name="MouseButtonTypeComboBox" x:Uid="ComboBoxMouseButton" Grid.Row="1" + Grid.Column="0" SelectedIndex="0"> @@ -89,7 +91,10 @@ - + + \ No newline at end of file diff --git a/FluentAutoClicker/MainPage.xaml.cs b/FluentAutoClicker/MainPage.xaml.cs index 62f5a78..4f91350 100644 --- a/FluentAutoClicker/MainPage.xaml.cs +++ b/FluentAutoClicker/MainPage.xaml.cs @@ -19,11 +19,13 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Automation.Peers; using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Media; using System.ComponentModel; using System.Globalization; using System.Runtime.InteropServices; using Windows.System; +using Windows.UI.ApplicationSettings; namespace FluentAutoClicker; @@ -177,4 +179,9 @@ private void ClickOffsetCheckBox_Checked(object sender, RoutedEventArgs e) { ClickOffsetAmount.IsEnabled = true; } + + private void SettingsButton_Click(object sender, RoutedEventArgs e) + { + //Frame.Navigate(typeof(SettingsPage)); + } } \ No newline at end of file From f3412f34460f6f83a79017426b7ece3e8acff20e Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 12:51:26 -0800 Subject: [PATCH 03/84] Add empty settings page --- FluentAutoClicker/SettingsPage.xaml | 15 +++++++++++++ FluentAutoClicker/SettingsPage.xaml.cs | 31 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 FluentAutoClicker/SettingsPage.xaml create mode 100644 FluentAutoClicker/SettingsPage.xaml.cs diff --git a/FluentAutoClicker/SettingsPage.xaml b/FluentAutoClicker/SettingsPage.xaml new file mode 100644 index 0000000..8f2af0e --- /dev/null +++ b/FluentAutoClicker/SettingsPage.xaml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/FluentAutoClicker/SettingsPage.xaml.cs b/FluentAutoClicker/SettingsPage.xaml.cs new file mode 100644 index 0000000..16d52a6 --- /dev/null +++ b/FluentAutoClicker/SettingsPage.xaml.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace FluentAutoClicker +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class SettingsPage : Page + { + public SettingsPage() + { + this.InitializeComponent(); + } + } +} From 1d0a3f6190f9969ee48a02cb64e092c71df7d83d Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 12:54:19 -0800 Subject: [PATCH 04/84] Add navigation --- FluentAutoClicker/MainPage.xaml | 2 +- FluentAutoClicker/MainPage.xaml.cs | 2 +- FluentAutoClicker/MainWindow.xaml | 2 +- FluentAutoClicker/MainWindow.xaml.cs | 23 +++++++++++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/FluentAutoClicker/MainPage.xaml b/FluentAutoClicker/MainPage.xaml index 2d3afba..c5a57bd 100644 --- a/FluentAutoClicker/MainPage.xaml +++ b/FluentAutoClicker/MainPage.xaml @@ -8,7 +8,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> - + diff --git a/FluentAutoClicker/MainPage.xaml.cs b/FluentAutoClicker/MainPage.xaml.cs index 4f91350..c061f1f 100644 --- a/FluentAutoClicker/MainPage.xaml.cs +++ b/FluentAutoClicker/MainPage.xaml.cs @@ -182,6 +182,6 @@ private void ClickOffsetCheckBox_Checked(object sender, RoutedEventArgs e) private void SettingsButton_Click(object sender, RoutedEventArgs e) { - //Frame.Navigate(typeof(SettingsPage)); + Frame.Navigate(typeof(SettingsPage)); } } \ No newline at end of file diff --git a/FluentAutoClicker/MainWindow.xaml b/FluentAutoClicker/MainWindow.xaml index f56690b..74a2333 100644 --- a/FluentAutoClicker/MainWindow.xaml +++ b/FluentAutoClicker/MainWindow.xaml @@ -32,6 +32,6 @@ - + \ No newline at end of file diff --git a/FluentAutoClicker/MainWindow.xaml.cs b/FluentAutoClicker/MainWindow.xaml.cs index 2115f53..36dad2c 100644 --- a/FluentAutoClicker/MainWindow.xaml.cs +++ b/FluentAutoClicker/MainWindow.xaml.cs @@ -16,6 +16,8 @@ // along with Fluent Auto Clicker. If not, see . using FluentAutoClicker.Helpers; +using Microsoft.UI.Xaml.Navigation; +using WinUIEx; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. @@ -38,5 +40,26 @@ public MainWindow() // Set up window title bar ExtendsContentIntoTitleBar = true; AppTitleBar.Title = "AppDisplayName".GetLocalized(); + + // Set up frame + Frame.Navigate(typeof(MainPage)); + Frame.Navigated += OnNavigated; + + // Set up back button + AppTitleBar.IsBackButtonVisible = false; + AppTitleBar.BackRequested += BackRequested; + } + + private void BackRequested(TitleBar sender, object args) + { + if (Frame.CanGoBack) + { + Frame.GoBack(); + } + } + + private void OnNavigated(object sender, NavigationEventArgs e) + { + AppTitleBar.IsBackButtonVisible = e.SourcePageType != typeof(MainPage); } } \ No newline at end of file From 2eb85d22a9b5126bf4a85e69f515fb96a8de0428 Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 12:56:34 -0800 Subject: [PATCH 05/84] Cleanup --- FluentAutoClicker/MainPage.xaml.cs | 4 +-- FluentAutoClicker/MainWindow.xaml.cs | 2 +- FluentAutoClicker/SettingsPage.xaml.cs | 47 ++++++++++++++------------ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/FluentAutoClicker/MainPage.xaml.cs b/FluentAutoClicker/MainPage.xaml.cs index c061f1f..c9cef5c 100644 --- a/FluentAutoClicker/MainPage.xaml.cs +++ b/FluentAutoClicker/MainPage.xaml.cs @@ -19,13 +19,11 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Automation.Peers; using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Media; using System.ComponentModel; using System.Globalization; using System.Runtime.InteropServices; using Windows.System; -using Windows.UI.ApplicationSettings; namespace FluentAutoClicker; @@ -182,6 +180,6 @@ private void ClickOffsetCheckBox_Checked(object sender, RoutedEventArgs e) private void SettingsButton_Click(object sender, RoutedEventArgs e) { - Frame.Navigate(typeof(SettingsPage)); + _ = Frame.Navigate(typeof(SettingsPage)); } } \ No newline at end of file diff --git a/FluentAutoClicker/MainWindow.xaml.cs b/FluentAutoClicker/MainWindow.xaml.cs index 36dad2c..d459612 100644 --- a/FluentAutoClicker/MainWindow.xaml.cs +++ b/FluentAutoClicker/MainWindow.xaml.cs @@ -42,7 +42,7 @@ public MainWindow() AppTitleBar.Title = "AppDisplayName".GetLocalized(); // Set up frame - Frame.Navigate(typeof(MainPage)); + _ = Frame.Navigate(typeof(MainPage)); Frame.Navigated += OnNavigated; // Set up back button diff --git a/FluentAutoClicker/SettingsPage.xaml.cs b/FluentAutoClicker/SettingsPage.xaml.cs index 16d52a6..4fc6d8c 100644 --- a/FluentAutoClicker/SettingsPage.xaml.cs +++ b/FluentAutoClicker/SettingsPage.xaml.cs @@ -1,31 +1,34 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Microsoft.UI.Xaml; +// Copyright (C) 2024 Ryan Luu +// +// This file is part of Fluent Auto Clicker. +// +// Fluent Auto Clicker is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Fluent Auto Clicker is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Fluent Auto Clicker. If not, see . + using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Navigation; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. -namespace FluentAutoClicker +namespace FluentAutoClicker; + +/// +/// An empty page that can be used on its own or navigated to within a Frame. +/// +public sealed partial class SettingsPage : Page { - /// - /// An empty page that can be used on its own or navigated to within a Frame. - /// - public sealed partial class SettingsPage : Page + public SettingsPage() { - public SettingsPage() - { - this.InitializeComponent(); - } + InitializeComponent(); } } From 93f0f33e383f2f4e5e972f4acdb488d2f0f6284c Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 13:00:06 -0800 Subject: [PATCH 06/84] Cache main page --- FluentAutoClicker/MainPage.xaml | 1 + 1 file changed, 1 insertion(+) diff --git a/FluentAutoClicker/MainPage.xaml b/FluentAutoClicker/MainPage.xaml index c5a57bd..742593c 100644 --- a/FluentAutoClicker/MainPage.xaml +++ b/FluentAutoClicker/MainPage.xaml @@ -6,6 +6,7 @@ xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + NavigationCacheMode="Enabled" mc:Ignorable="d"> From 923fa77369324ebd6f406c531a812b2a9e102a9a Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Wed, 11 Dec 2024 14:12:13 -0800 Subject: [PATCH 07/84] Move styles to main page --- FluentAutoClicker/MainPage.xaml | 15 +++++++++++---- FluentAutoClicker/Styles.xaml | 5 ----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/FluentAutoClicker/MainPage.xaml b/FluentAutoClicker/MainPage.xaml index 742593c..2a83b14 100644 --- a/FluentAutoClicker/MainPage.xaml +++ b/FluentAutoClicker/MainPage.xaml @@ -9,6 +9,13 @@ NavigationCacheMode="Enabled" mc:Ignorable="d"> + + 4 + 8 + 8 + 8 + + @@ -22,9 +29,9 @@ - + - + @@ -95,7 +102,7 @@ + Spacing="{StaticResource StackPanelSpacing}"> From cb5ec8867d01d0bc2d07a5ee8d63c091ca3ebd4a Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Tue, 21 Jan 2025 14:28:20 -0800 Subject: [PATCH 25/84] Fix button sizing --- FluentAutoClicker/MainPage.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FluentAutoClicker/MainPage.xaml b/FluentAutoClicker/MainPage.xaml index 93bc264..7a8aa08 100644 --- a/FluentAutoClicker/MainPage.xaml +++ b/FluentAutoClicker/MainPage.xaml @@ -168,7 +168,7 @@