mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Merge branch 'development' into VisualScripting
This commit is contained in:
commit
3874078f16
35 files changed
+790
-506
No files matched your search
@@ -38,199 +38,193 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Source="{svgc:SvgImage Source=/Resources/Images/Logo/bow.svg}" Height="100" Width="100" />
|
||||
<StackPanel Grid.Column="1" Margin="24 0 0 0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline4TextBlock}" TextWrapping="Wrap">
|
||||
<Run Text="Welcome to Artemis, the unified" />
|
||||
<Run Text="RGB">
|
||||
<Run.Foreground>
|
||||
<LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
|
||||
<GradientStop Color="#f19d25" />
|
||||
<GradientStop Color="#f63d3d" Offset="0.2" />
|
||||
<GradientStop Color="#c93cec" Offset="0.4" />
|
||||
<GradientStop Color="#2667f4" Offset="0.6" />
|
||||
<GradientStop Color="#1cb6e7" Offset="0.8" />
|
||||
<GradientStop Color="#2df4b5" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Run.Foreground>
|
||||
</Run>
|
||||
<Run Text="platform." />
|
||||
</TextBlock>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}"
|
||||
Foreground="{StaticResource SecondaryHueMidBrush}"
|
||||
materialDesign:RippleAssist.Feedback="{StaticResource SecondaryHueMidBrush}"
|
||||
Command="{x:Static materialDesign:DrawerHost.OpenDrawerCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Binoculars" />
|
||||
<TextBlock Margin="8 0 0 0">EXPLORE</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<Image Source="{svgc:SvgImage Source=/Resources/Images/Logo/bow.svg}" Height="80" Width="80" />
|
||||
<TextBlock Grid.Column="1" Margin="24 0 0 0" VerticalAlignment="Center" Style="{StaticResource MaterialDesignHeadline4TextBlock}" TextWrapping="Wrap">
|
||||
<Run Text="Welcome to Artemis, the unified" />
|
||||
<Run Text="RGB">
|
||||
<Run.Foreground>
|
||||
<LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
|
||||
<GradientStop Color="#f19d25" />
|
||||
<GradientStop Color="#f63d3d" Offset="0.2" />
|
||||
<GradientStop Color="#c93cec" Offset="0.4" />
|
||||
<GradientStop Color="#2667f4" Offset="0.6" />
|
||||
<GradientStop Color="#1cb6e7" Offset="0.8" />
|
||||
<GradientStop Color="#2df4b5" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Run.Foreground>
|
||||
</Run>
|
||||
<Run Text="platform." />
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0 0 0 32">
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="Auto">
|
||||
<StackPanel>
|
||||
<materialDesign:Card Width="840" Margin="8 16" Height="Auto">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="155" />
|
||||
<RowDefinition Height="95" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Discord" Width="140" Height="140"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<materialDesign:PackIcon Kind="Plug" Width="140" Height="140" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="16 16 16 8">Have a chat</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="16 0 16 8"
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="16 16 16 8">Plugins</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
||||
TextWrapping="Wrap" Margin="16 0 16 8"
|
||||
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">
|
||||
If you need help, have some feedback or have any other questions feel free to contact us through any of the
|
||||
following channels.
|
||||
Artemis is built up using plugins. This means devices, brushes, effects and modules (for supporting games!) can all be added via plugins. <LineBreak /> <LineBreak />
|
||||
Under Settings > Plugins you can find your currently installed plugins, these default plugins are created by Artemis developers.
|
||||
<LineBreak /> <LineBreak />
|
||||
We're also keeping track of a list of third-party plugins on our wiki.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" BorderThickness="0 1 0 0"
|
||||
BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Left"
|
||||
x:Name="GitHubButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://github.com/Artemis-RGB/Artemis">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Github" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">GitHub</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="0" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Right"
|
||||
x:Name="WebsiteButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://artemis-rgb.com">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Web" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Website</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="1" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Left"
|
||||
x:Name="DiscordButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://discordapp.com/invite/S3MVaC9">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Discord" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Discord</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="1" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Right"
|
||||
x:Name="MailButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="mailto:spoinky.nl@gmail.com">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Email" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">E-mail</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="Auto">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="155" />
|
||||
<RowDefinition Height="95" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Github" Width="160" Height="160"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="16 16 16 8">Open Source</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="16 0 16 8"
|
||||
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">
|
||||
This project is completely open source. If you like it and want to say thanks you could hit the GitHub Star button,
|
||||
I like numbers. You could even make plugins, there's a full documentation on the website
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" BorderThickness="0 1 0 0"
|
||||
BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
DockPanel.Dock="Right"
|
||||
x:Name="DonateButton"
|
||||
Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VQBAEJYUFLU4J">
|
||||
CommandParameter="https://wiki.artemis-rgb.com/en/guides/user/plugins">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Gift" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Donate</TextBlock>
|
||||
<materialDesign:PackIcon Kind="OpenInBrowser" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Get more plugins</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
TextWrapping="Wrap"
|
||||
Margin="16"
|
||||
VerticalAlignment="Center">
|
||||
Feel like you want to make a donation? It would be gratefully received. Click the button to donate via PayPal.
|
||||
Want more plugins? You can find them on our wiki.
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="Auto">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="175" />
|
||||
<RowDefinition Height="95" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Discord" Width="140" Height="140"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="16 16 16 8">Have a chat</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
||||
TextWrapping="Wrap" Margin="16 0 16 8"
|
||||
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">
|
||||
If you need help, have some feedback or have any other questions feel free to contact us through any of the
|
||||
following channels.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" BorderThickness="0 1 0 0"
|
||||
BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Grid Margin="8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Left"
|
||||
x:Name="GitHubButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://github.com/Artemis-RGB/Artemis">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Github" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">GitHub</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="0" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Right"
|
||||
x:Name="WebsiteButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://artemis-rgb.com">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Web" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Website</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="1" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Left"
|
||||
x:Name="DiscordButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://discordapp.com/invite/S3MVaC9">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Discord" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Discord</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Grid.Row="1" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Right"
|
||||
x:Name="MailButton" Command="{s:Action OpenUrl}"
|
||||
CommandParameter="mailto:spoinky.nl@gmail.com">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Email" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">E-mail</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="Auto">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="175" />
|
||||
<RowDefinition Height="95" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Github" Width="160" Height="160"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="16 16 16 8">Open Source</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}"
|
||||
TextWrapping="Wrap" Margin="16 0 16 8"
|
||||
Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">
|
||||
This project is completely open source. If you like it and want to say thanks you could hit the GitHub Star button,
|
||||
I like numbers. You could even make plugins, there's a full documentation on the website
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" BorderThickness="0 1 0 0"
|
||||
BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
DockPanel.Dock="Right"
|
||||
x:Name="DonateButton"
|
||||
Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VQBAEJYUFLU4J">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Gift" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Donate</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
TextWrapping="Wrap"
|
||||
Margin="16"
|
||||
VerticalAlignment="Center">
|
||||
Feel like you want to make a donation? It would be gratefully received. Click the button to donate via PayPal.
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</ScrollViewer>
|
||||
<!-- PopupBox could be nice in the future when we actually have some stuff to send ppl to -->
|
||||
<!--<materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
||||
Margin="32" Grid.Row="1">
|
||||
--><!-- add the visibility binding https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/issues/723 --><!--
|
||||
<StackPanel Visibility="{Binding Path=IsPopupOpen, ElementName=MyPopupBox, Converter={StaticResource BoolToVisibilityConverter}}">
|
||||
<Button ToolTip="GitHub" Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis">
|
||||
<materialDesign:PackIcon Kind="Github" Height="20" Width="20" />
|
||||
</Button>
|
||||
<Button ToolTip="Twitter" Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis"
|
||||
Background="{DynamicResource PrimaryHueMidBrush}"
|
||||
Foreground="{DynamicResource PrimaryHueMidForegroundBrush}">
|
||||
<materialDesign:PackIcon Kind="Twitter" />
|
||||
</Button>
|
||||
<Button ToolTip="Chat" Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis">
|
||||
--><!-- mix up the colours by brinking in a named palette (see merged dictionaries at top) --><!--
|
||||
<Button.Background>
|
||||
<SolidColorBrush Color="{StaticResource GreenPrimary500}" />
|
||||
</Button.Background>
|
||||
<Button.Foreground>
|
||||
<SolidColorBrush Color="{StaticResource GreenPrimary500Foreground}" />
|
||||
</Button.Foreground>
|
||||
<materialDesign:PackIcon Kind="Message" />
|
||||
</Button>
|
||||
<Button ToolTip="Email" Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis"
|
||||
Background="{DynamicResource SecondaryHueMidBrush}"
|
||||
Foreground="{DynamicResource SecondaryHueMidForegroundBrush}"
|
||||
>
|
||||
<materialDesign:PackIcon Kind="Email" />
|
||||
</Button>
|
||||
<Button ToolTip="Feel like you want to make a donation? It would be gratefully received. Click the button to donate via Pledgie."
|
||||
Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis">
|
||||
<Button.Background>
|
||||
<SolidColorBrush Color="{StaticResource GreenPrimary200}" />
|
||||
</Button.Background>
|
||||
<Button.Foreground>
|
||||
<SolidColorBrush Color="{StaticResource GreenPrimary200Foreground}" />
|
||||
</Button.Foreground>
|
||||
<materialDesign:PackIcon Kind="Gift" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>-->
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -259,8 +259,14 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
|
||||
|
||||
public void ResetZoomAndPan()
|
||||
{
|
||||
if (!Devices.Any())
|
||||
{
|
||||
PanZoomViewModel.Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
// Create a rect surrounding all devices
|
||||
SKRect rect = new SKRect(
|
||||
SKRect rect = new(
|
||||
Devices.Min(d => d.Rectangle.Left),
|
||||
Devices.Min(d => d.Rectangle.Top),
|
||||
Devices.Max(d => d.Rectangle.Right),
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace Artemis.UI.Screens.Settings.Device.Tabs
|
||||
Device.GreenScale = GreenScale / 100f;
|
||||
Device.BlueScale = BlueScale / 100f;
|
||||
|
||||
_rgbService.Surface.Update(true);
|
||||
_rgbService.FlushLeds = true;
|
||||
}
|
||||
|
||||
public void BrowseCustomLayout(object sender, MouseEventArgs e)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance local:SettingsTabsViewModel}">
|
||||
@@ -16,18 +17,31 @@
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<TabControl Style="{StaticResource MaterialDesignAppBarTabControl}"
|
||||
ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding ActiveItem}"
|
||||
DisplayMemberPath="DisplayName">
|
||||
<TabControl.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl s:View.Model="{Binding IsAsync=True}"
|
||||
VerticalContentAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
IsTabStop="False"
|
||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}" />
|
||||
</DataTemplate>
|
||||
</TabControl.ContentTemplate>
|
||||
</TabControl>
|
||||
<Grid>
|
||||
<TabControl Style="{StaticResource MaterialDesignAppBarTabControl}"
|
||||
ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding ActiveItem}"
|
||||
DisplayMemberPath="DisplayName">
|
||||
<TabControl.ContentTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl s:View.Model="{Binding IsAsync=True}"
|
||||
VerticalContentAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
IsTabStop="False"
|
||||
TextElement.Foreground="{DynamicResource MaterialDesignBody}" />
|
||||
</DataTemplate>
|
||||
</TabControl.ContentTemplate>
|
||||
</TabControl>
|
||||
|
||||
<!-- Bug: materialDesign:RippleAssist.RippleOnTop doesn't look as nice but otherwise it doesn't work at all, not sure why -->
|
||||
<Button Style="{StaticResource MaterialDesignIconForegroundButton}"
|
||||
VerticalAlignment="Top"
|
||||
HorizontalAlignment="Right"
|
||||
ToolTip="Open debugger"
|
||||
Command="{s:Action ShowDebugger}"
|
||||
materialDesign:RippleAssist.RippleOnTop="True">
|
||||
<materialDesign:PackIcon Kind="Matrix" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
@@ -2,18 +2,23 @@
|
||||
using Artemis.UI.Screens.Settings.Tabs.Devices;
|
||||
using Artemis.UI.Screens.Settings.Tabs.General;
|
||||
using Artemis.UI.Screens.Settings.Tabs.Plugins;
|
||||
using Artemis.UI.Services;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings
|
||||
{
|
||||
public class SettingsTabsViewModel : Conductor<Screen>.Collection.OneActive
|
||||
{
|
||||
private readonly IDebugService _debugService;
|
||||
|
||||
public SettingsTabsViewModel(
|
||||
GeneralSettingsTabViewModel generalSettingsTabViewModel,
|
||||
PluginSettingsTabViewModel pluginSettingsTabViewModel,
|
||||
DeviceSettingsTabViewModel deviceSettingsTabViewModel,
|
||||
AboutTabViewModel aboutTabViewModel)
|
||||
AboutTabViewModel aboutTabViewModel,
|
||||
IDebugService debugService)
|
||||
{
|
||||
_debugService = debugService;
|
||||
DisplayName = "Settings";
|
||||
|
||||
Items.Add(generalSettingsTabViewModel);
|
||||
@@ -23,5 +28,10 @@ namespace Artemis.UI.Screens.Settings
|
||||
|
||||
ActiveItem = generalSettingsTabViewModel;
|
||||
}
|
||||
|
||||
public void ShowDebugger()
|
||||
{
|
||||
_debugService.ShowDebugger();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
}
|
||||
|
||||
public PluginFeatureInfo FeatureInfo { get; }
|
||||
public Exception LoadException => FeatureInfo.Instance?.LoadException;
|
||||
public Exception LoadException => FeatureInfo.LoadException;
|
||||
|
||||
public bool ShowShield { get; }
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
public async Task InstallPrerequisites()
|
||||
{
|
||||
if (FeatureInfo.Prerequisites.Any())
|
||||
await PluginPrerequisitesInstallDialogViewModel.Show(_dialogService, new List<IPrerequisitesSubject> { FeatureInfo });
|
||||
await PluginPrerequisitesInstallDialogViewModel.Show(_dialogService, new List<IPrerequisitesSubject> {FeatureInfo});
|
||||
}
|
||||
|
||||
public async Task RemovePrerequisites()
|
||||
@@ -119,12 +119,19 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
|
||||
private async Task UpdateEnabled(bool enable)
|
||||
{
|
||||
if (IsEnabled == enable || FeatureInfo.Instance == null)
|
||||
if (IsEnabled == enable)
|
||||
{
|
||||
NotifyOfPropertyChange(nameof(IsEnabled));
|
||||
return;
|
||||
}
|
||||
|
||||
if (FeatureInfo.Instance == null)
|
||||
{
|
||||
NotifyOfPropertyChange(nameof(IsEnabled));
|
||||
_messageService.ShowMessage($"Feature '{FeatureInfo.Name}' is in a broken state and cannot enable.", "VIEW LOGS", ShowLogsFolder);
|
||||
return;
|
||||
}
|
||||
|
||||
if (enable)
|
||||
{
|
||||
Enabling = true;
|
||||
@@ -144,7 +151,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
// Check if all prerequisites are met async
|
||||
if (!FeatureInfo.ArePrerequisitesMet())
|
||||
{
|
||||
await PluginPrerequisitesInstallDialogViewModel.Show(_dialogService, new List<IPrerequisitesSubject> { FeatureInfo });
|
||||
await PluginPrerequisitesInstallDialogViewModel.Show(_dialogService, new List<IPrerequisitesSubject> {FeatureInfo});
|
||||
if (!FeatureInfo.ArePrerequisitesMet())
|
||||
{
|
||||
NotifyOfPropertyChange(nameof(IsEnabled));
|
||||
@@ -156,7 +163,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_messageService.ShowMessage($"Failed to enable {FeatureInfo.Name}\r\n{e.Message}", "VIEW LOGS", ShowLogsFolder);
|
||||
_messageService.ShowMessage($"Failed to enable '{FeatureInfo.Name}'.\r\n{e.Message}", "VIEW LOGS", ShowLogsFolder);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" TextWrapping="Wrap">
|
||||
The list below shows all loaded plugins. <LineBreak />
|
||||
@@ -38,7 +39,17 @@
|
||||
Margin="5 0"
|
||||
Text="{Binding SearchPluginInput, Delay=300, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Button Grid.Column="3"
|
||||
<Button Grid.Column="3" Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{s:Action OpenUrl}"
|
||||
CommandParameter="https://wiki.artemis-rgb.com/en/guides/user/plugins">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="OpenInBrowser" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Get more plugins</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="4"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{StaticResource MaterialDesignRaisedButton}"
|
||||
Command="{s:Action ImportPlugin}"
|
||||
|
||||
@@ -77,6 +77,11 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
base.OnInitialActivate();
|
||||
}
|
||||
|
||||
public void OpenUrl(string url)
|
||||
{
|
||||
Core.Utilities.OpenUrl(url);
|
||||
}
|
||||
|
||||
public async Task ImportPlugin()
|
||||
{
|
||||
VistaOpenFileDialog dialog = new() {Filter = "ZIP files (*.zip)|*.zip", Title = "Import Artemis plugin"};
|
||||
|
||||
@@ -31,14 +31,14 @@ namespace Artemis.UI.Screens.StartupWizard.Steps
|
||||
/// <inheritdoc />
|
||||
protected override void OnActivate()
|
||||
{
|
||||
_rgbService.IsRenderPaused = true;
|
||||
_rgbService.SetRenderPaused(true);
|
||||
base.OnActivate();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnDeactivate()
|
||||
{
|
||||
_rgbService.IsRenderPaused = false;
|
||||
_rgbService.SetRenderPaused(false);
|
||||
base.OnDeactivate();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,9 +63,8 @@
|
||||
<Border BorderBrush="{DynamicResource MaterialDesignDivider}" BorderThickness="0 0 0 1" Margin="0 10" />
|
||||
</StackPanel>
|
||||
|
||||
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="1" Grid.Column="0"
|
||||
VerticalAlignment="Stretch" Margin="0,0,5,0">
|
||||
<Grid ClipToBounds="True"
|
||||
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" Grid.Row="1" Grid.Column="0" VerticalAlignment="Stretch" Margin="0,0,5,0">
|
||||
<Grid ClipToBounds="False"
|
||||
Focusable="True"
|
||||
FocusVisualStyle="{StaticResource FocusVisual}"
|
||||
KeyUp="{s:Action EditorGridKeyUp}"
|
||||
@@ -188,8 +187,16 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
<Canvas>
|
||||
<Rectangle ClipToBounds="False"
|
||||
Width="{Binding MaxTextureSize}"
|
||||
Height="{Binding MaxTextureSize}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
StrokeThickness="{Binding MaxTextureSizeIndicatorThickness}"
|
||||
StrokeDashArray="2 2" />
|
||||
</Canvas>
|
||||
</Grid>
|
||||
|
||||
|
||||
<!-- Multi-selection rectangle -->
|
||||
<Path Data="{Binding SelectionRectangle}" Opacity="0"
|
||||
Stroke="{DynamicResource PrimaryHueLightBrush}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -106,6 +107,9 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
set => SetAndNotify(ref _colorFirstLedOnly, value);
|
||||
}
|
||||
|
||||
public double MaxTextureSize => 4096 / _settingsService.GetSetting("Core.RenderScale", 0.5).Value;
|
||||
public double MaxTextureSizeIndicatorThickness => 2 / PanZoomViewModel.Zoom;
|
||||
|
||||
public void OpenHyperlink(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
Core.Utilities.OpenUrl(e.Uri.AbsoluteUri);
|
||||
@@ -155,7 +159,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
protected override void OnInitialActivate()
|
||||
{
|
||||
LoadWorkspaceSettings();
|
||||
SurfaceDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex).Select(d => new SurfaceDeviceViewModel(d, _rgbService)));
|
||||
SurfaceDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex).Select(d => new SurfaceDeviceViewModel(d, _rgbService, _settingsService)));
|
||||
ListDeviceViewModels.AddRange(_rgbService.EnabledDevices.OrderBy(d => d.ZIndex * -1).Select(d => new ListDeviceViewModel(d, this)));
|
||||
|
||||
List<ArtemisDevice> shuffledDevices = _rgbService.EnabledDevices.OrderBy(d => Guid.NewGuid()).ToList();
|
||||
@@ -168,7 +172,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
}
|
||||
|
||||
_coreService.FrameRendering += CoreServiceOnFrameRendering;
|
||||
|
||||
PanZoomViewModel.PropertyChanged += PanZoomViewModelOnPropertyChanged;
|
||||
base.OnInitialActivate();
|
||||
}
|
||||
|
||||
@@ -179,10 +183,17 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
ListDeviceViewModels.Clear();
|
||||
|
||||
_coreService.FrameRendering -= CoreServiceOnFrameRendering;
|
||||
PanZoomViewModel.PropertyChanged -= PanZoomViewModelOnPropertyChanged;
|
||||
|
||||
base.OnClose();
|
||||
}
|
||||
|
||||
private void PanZoomViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(PanZoomViewModel.Zoom))
|
||||
NotifyOfPropertyChange(nameof(MaxTextureSizeIndicatorThickness));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Context menu actions
|
||||
@@ -322,7 +333,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
SurfaceDeviceViewModel device = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, selectedRect).FirstOrDefault();
|
||||
if (device != null)
|
||||
{
|
||||
_rgbService.IsRenderPaused = true;
|
||||
_rgbService.SetRenderPaused(true);
|
||||
_mouseDragStatus = MouseDragStatus.Dragging;
|
||||
// If the device is not selected, deselect others and select only this one (if shift not held)
|
||||
if (device.SelectionStatus != SelectionStatus.Selected)
|
||||
@@ -367,7 +378,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
}
|
||||
|
||||
_mouseDragStatus = MouseDragStatus.None;
|
||||
_rgbService.IsRenderPaused = false;
|
||||
_rgbService.SetRenderPaused(false);
|
||||
ApplySurfaceSelection();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,15 +14,17 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
||||
public class SurfaceDeviceViewModel : PropertyChangedBase
|
||||
{
|
||||
private readonly IRgbService _rgbService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
private Cursor _cursor;
|
||||
private double _dragOffsetX;
|
||||
private double _dragOffsetY;
|
||||
private SelectionStatus _selectionStatus;
|
||||
|
||||
public SurfaceDeviceViewModel(ArtemisDevice device, IRgbService rgbService)
|
||||
public SurfaceDeviceViewModel(ArtemisDevice device, IRgbService rgbService, ISettingsService settingsService)
|
||||
{
|
||||
Device = device;
|
||||
_rgbService = rgbService;
|
||||
_settingsService = settingsService;
|
||||
}
|
||||
|
||||
public ArtemisDevice Device { get; }
|
||||
@@ -101,6 +103,10 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
||||
if (x < 0 || y < 0)
|
||||
return false;
|
||||
|
||||
double maxTextureSize = 4096 / _settingsService.GetSetting("Core.RenderScale", 0.5).Value;
|
||||
if (x + Device.Rectangle.Width > maxTextureSize || y + Device.Rectangle.Height > maxTextureSize)
|
||||
return false;
|
||||
|
||||
List<SKRect> own = Device.Leds
|
||||
.Select(l => SKRect.Create(l.Rectangle.Left + x, l.Rectangle.Top + y, l.Rectangle.Width, l.Rectangle.Height))
|
||||
.ToList();
|
||||
|
||||
Reference in new issue
Block a user