mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
UI - Added keyboard layout selection UI
This commit is contained in:
1 parent
ea1633c322
commit
46d3a288e9
20 files changed
+460
-12
No files matched your search
@@ -27,10 +27,12 @@
|
||||
<TextBlock Grid.Column="0">
|
||||
This image shows what is being rendered and dispatched to RGB.NET
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,5,0" FontWeight="Bold">
|
||||
FPS:
|
||||
<TextBlock Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,5,0">
|
||||
<Run Text="FPS: "></Run>
|
||||
<Run FontWeight="Bold" Text="{Binding CurrentFps}"></Run>
|
||||
<Run Text=" at "></Run>
|
||||
<Run Text="{Binding RenderWidth}"/><Run Text="x"></Run><Run Text="{Binding RenderHeight}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="2" HorizontalAlignment="Right" Text="{Binding CurrentFps}" />
|
||||
</Grid>
|
||||
|
||||
<materialDesign:Card Grid.Row="2" Margin="0,5,0,0" Background="{StaticResource Checkerboard}">
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
private readonly ICoreService _coreService;
|
||||
private double _currentFps;
|
||||
private ImageSource _currentFrame;
|
||||
private int _renderWidth;
|
||||
private int _renderHeight;
|
||||
|
||||
public RenderDebugViewModel(ICoreService coreService)
|
||||
{
|
||||
@@ -34,6 +36,18 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
set => SetAndNotify(ref _currentFps, value);
|
||||
}
|
||||
|
||||
public int RenderWidth
|
||||
{
|
||||
get => _renderWidth;
|
||||
set => SetAndNotify(ref _renderWidth, value);
|
||||
}
|
||||
|
||||
public int RenderHeight
|
||||
{
|
||||
get => _renderHeight;
|
||||
set => SetAndNotify(ref _renderHeight, value);
|
||||
}
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
_coreService.FrameRendered += CoreServiceOnFrameRendered;
|
||||
@@ -56,6 +70,8 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
return;
|
||||
|
||||
SKImageInfo bitmapInfo = e.Texture.Bitmap.Info;
|
||||
RenderHeight = bitmapInfo.Height;
|
||||
RenderWidth = bitmapInfo.Width;
|
||||
|
||||
if (!(CurrentFrame is WriteableBitmap writeableBitmap) ||
|
||||
writeableBitmap.Width != bitmapInfo.Width ||
|
||||
|
||||
Reference in new issue
Block a user