From 746a78577e63355aaaec6de9a99a370afa9d5e34 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sun, 24 Oct 2021 00:57:57 +0200 Subject: [PATCH] UI for manual zoom and video alignment --- src/common/components/Button.vue | 35 ++- src/common/enums/VideoAlignmentType.enum.ts | 2 + .../AlignmentOptionsControlComponent.vue | 153 ++++++++++++++ src/csui/PlayerUiPanels/VideoSettings.vue | 200 ++++++++++++++---- 4 files changed, 342 insertions(+), 48 deletions(-) create mode 100644 src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue diff --git a/src/common/components/Button.vue b/src/common/components/Button.vue index 1e6312c..213859e 100644 --- a/src/common/components/Button.vue +++ b/src/common/components/Button.vue @@ -1,8 +1,11 @@ @@ -12,6 +15,30 @@ export default { fixedWidth: Boolean, selected: Boolean, label: String, + icon: String, } } + + diff --git a/src/common/enums/VideoAlignmentType.enum.ts b/src/common/enums/VideoAlignmentType.enum.ts index bd22d26..1f6953f 100644 --- a/src/common/enums/VideoAlignmentType.enum.ts +++ b/src/common/enums/VideoAlignmentType.enum.ts @@ -2,6 +2,8 @@ enum VideoAlignmentType { Left = 0, Center = 1, Right = 2, + Top = 3, + Bottom = 4, Default = -1 }; diff --git a/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue b/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue new file mode 100644 index 0000000..d41540f --- /dev/null +++ b/src/csui/PlayerUiPanels/AlignmentOptionsControlComponent.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/csui/PlayerUiPanels/VideoSettings.vue b/src/csui/PlayerUiPanels/VideoSettings.vue index e67ba5e..3651b5c 100644 --- a/src/csui/PlayerUiPanels/VideoSettings.vue +++ b/src/csui/PlayerUiPanels/VideoSettings.vue @@ -42,53 +42,144 @@ min, max and value need to be implemented in js as this slider should use logarithmic scale --> -
- +
- -
-
- Zoom: {{(zoom * 100).toFixed()}}% + +
@@ -96,14 +187,26 @@

Video alignment:

-
+
+ + +
+ +
+
+ + Pan with mouse +