Skip to content

Commit

Permalink
FMV UI tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesWu committed Oct 13, 2024
1 parent 8145cc5 commit 905ebc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FreeMote.Tools.Viewer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Button Width="30" HorizontalAlignment="Right" Content="📷" ToolTip="ScreenShot" Margin="0,5,5,5" Background="Transparent" Foreground="Aquamarine" BorderThickness="3" BorderBrush="Aquamarine" Click="RenderImage"></Button>
<Button Width="60" HorizontalAlignment="Right" Content="Motion" Margin="0,5,5,5" Background="Transparent" Foreground="Aquamarine" BorderThickness="3" BorderBrush="Aquamarine" Click="GetTimelines"></Button>
<Button Width="60" HorizontalAlignment="Right" Content="Stop" Margin="0,5,5,5" Background="Transparent" Foreground="Aquamarine" BorderThickness="3" BorderBrush="Aquamarine" Click="Stop"></Button>
<Button Width="60" HorizontalAlignment="Right" Content="Clear" Margin="0,5,5,5" Background="Transparent" Foreground="Aquamarine" BorderThickness="3" BorderBrush="Aquamarine" Click="Clear"></Button>
<Button Width="60" HorizontalAlignment="Right" Content="Clear" Margin="0,5,0,5" Background="Transparent" Foreground="Aquamarine" BorderThickness="3" BorderBrush="Aquamarine" Click="Clear"></Button>
</StackPanel>
<ScrollViewer x:Name="ScrollMotion" VerticalScrollBarVisibility="Auto" Grid.Column="1" Grid.Row="1" IsHitTestVisible="False">
<StackPanel Name="MotionPanel" HorizontalAlignment="Right" Orientation="Vertical">
Expand Down
12 changes: 7 additions & 5 deletions FreeMote.Tools.Viewer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void MainWindow_MouseWheel(object sender, MouseWheelEventArgs e)

void MainWindow_MouseMove(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed) //&& e.GetPosition(MotionPanel).X < 0
if (e.LeftButton == MouseButtonState.Pressed || e.MiddleButton == MouseButtonState.Pressed) //&& e.GetPosition(MotionPanel).X < 0
{
var ex = e.GetPosition(this);
_player.OffsetCoord((int) (ex.X - _lastX), (int) (ex.Y - _lastY));
Expand Down Expand Up @@ -484,11 +484,12 @@ private void GetTimelines(object sender, RoutedEventArgs e)
{
//Name = _player.GetDiffTimelineLabelAt(i),
Content = _player.GetMainTimelineLabelAt(i),
Width = 180,
Width = 185,
Tag = "main",
Margin = new Thickness(0, 0, 5, 5),
Background = Brushes.Transparent,
Foreground = Brushes.Khaki,
Foreground = Brushes.DarkOrange,
FontWeight = FontWeights.Bold
};
btn.Click += PlayTimeline;
MotionPanel.Children.Add(btn);
Expand All @@ -507,11 +508,12 @@ private void GetTimelines(object sender, RoutedEventArgs e)
{
//Name = _player.GetDiffTimelineLabelAt(i),
Content = _player.GetDiffTimelineLabelAt(i),
Width = 180,
Width = 185,
Tag = "diff",
Margin = new Thickness(0, 0, 5, 5),
Background = Brushes.Transparent,
Foreground = Brushes.Khaki,
Foreground = Brushes.DarkOrange,
FontWeight = FontWeights.Bold
};
btn.Click += PlayTimeline;
MotionPanel.Children.Add(btn);
Expand Down

0 comments on commit 905ebc6

Please sign in to comment.