diff --git a/src/app/modules/replay/replay-feature-settings.ts b/src/app/modules/replay/replay-feature-settings.ts
index 0e68ea88..56acbe4e 100644
--- a/src/app/modules/replay/replay-feature-settings.ts
+++ b/src/app/modules/replay/replay-feature-settings.ts
@@ -1,6 +1,9 @@
import { FeatureSettings } from '@app/feature';
export interface ReplayFeatureSettings extends FeatureSettings {
+ replayCaptureManually?: boolean;
+ replayCaptureManuallyPastDuration?: number;
+ replayCaptureManuallyFutureDuration?: number;
replayCaptureDeath?: boolean;
replayCaptureDeathPastDuration?: number;
replayCaptureDeathFutureDuration?: number;
diff --git a/src/app/modules/replay/replay.module.ts b/src/app/modules/replay/replay.module.ts
index ece922d1..523d06f4 100644
--- a/src/app/modules/replay/replay.module.ts
+++ b/src/app/modules/replay/replay.module.ts
@@ -1,4 +1,5 @@
import { NgModule } from '@angular/core';
+import { Hotkey } from '@app/config';
import { Feature, FeatureConfig, FeatureModule, FEATURE_MODULES } from '@app/feature';
import { NotificationService } from '@app/notification';
import { GameEvent, RunningGameInfo } from '@app/odk';
@@ -35,25 +36,46 @@ export class ReplayModule implements FeatureModule {
replayCaptureDeathPastDuration: 8,
replayCaptureKill: false,
replayCaptureKillFutureDuration: 3,
- replayCaptureKillPastDuration: 5
+ replayCaptureKillPastDuration: 5,
+ replayCaptureManually: false,
+ replayCaptureManuallyFutureDuration: 0,
+ replayCaptureManuallyPastDuration: 10,
}
};
return config;
}
public getFeatures(): Feature[] {
- const features: Feature[] = [];
+ const features: Feature[] = [
+ { hotkey: Hotkey.ReplayManually }
+ ];
return features;
}
public onSettingsChange(settings: ReplayFeatureSettings): void {
- const shouldCapture = settings.replayCaptureDeath || settings.replayCaptureKill;
+ const shouldCapture = settings.replayCaptureManually || settings.replayCaptureDeath || settings.replayCaptureKill;
if (shouldCapture !== this.shouldCapture) {
this.shouldCapture = shouldCapture;
this.updateCapturing();
}
}
+ public onKeyPressed(hotkey: Hotkey, settings: ReplayFeatureSettings): void {
+ switch (hotkey) {
+ case Hotkey.ReplayManually:
+ if (settings.replayCaptureManually) {
+ this.replay.capture(
+ settings.replayCaptureManuallyPastDuration,
+ settings.replayCaptureManuallyFutureDuration
+ ).subscribe(() => { }, error => {
+ console.warn('Could not capture a manually triggered event.', error);
+ this.notification.show('replay.capture-error');
+ });
+ }
+ break;
+ }
+ }
+
public onGameEvent(event: GameEvent, settings: ReplayFeatureSettings): void {
switch (event?.name) {
case 'death':
@@ -82,12 +104,12 @@ export class ReplayModule implements FeatureModule {
}
public onInfo(info: RunningGameInfo, settings: ReplayFeatureSettings): void {
- const shouldCapture = settings.replayCaptureDeath || settings.replayCaptureKill;
+ const shouldCapture = settings.replayCaptureManually || settings.replayCaptureDeath || settings.replayCaptureKill;
const { isRunning } = info;
if (shouldCapture !== this.shouldCapture
|| isRunning !== this.isRunning) {
this.isRunning = info.isRunning;
- this.shouldCapture = settings.replayCaptureDeath || settings.replayCaptureKill;
+ this.shouldCapture = shouldCapture;
this.updateCapturing();
}
}
diff --git a/src/app/shared/module/odk/component/header/header.component.scss b/src/app/shared/module/odk/component/header/header.component.scss
index a1ebca4b..157c09d5 100644
--- a/src/app/shared/module/odk/component/header/header.component.scss
+++ b/src/app/shared/module/odk/component/header/header.component.scss
@@ -119,27 +119,20 @@ $border-color: #1a1a1a;
.content {
width: 100%;
-
- &:not(.inline) {
- &.has-footer {
- height: calc(100% - #{$footer-size} - #{$header-size});
- }
-
- height: calc(100% - #{$header-size});
- }
+ height: 100%;
&.fixed {
padding: $header-size 0 0 0;
&.has-footer {
- padding: $header-size 0 $footer-size - 1px 0;
+ padding: $header-size 0 $footer-size 0;
}
&.reverse {
padding: 0 0 $header-size 0;
&.has-footer {
- padding: $footer-size 0 $header-size - 1px 0;
+ padding: $footer-size 0 $header-size 0;
}
}
}
diff --git a/src/assets/i18n/english.json b/src/assets/i18n/english.json
index 04ee0e68..b1a7746f 100644
--- a/src/assets/i18n/english.json
+++ b/src/assets/i18n/english.json
@@ -371,6 +371,7 @@
"death": "Death event",
"future-duration": "Future duration",
"kill": "Kill event",
+ "manually": "Manually",
"name": "Replay",
"past-duration": "Past duration",
"start-error": "The events capturing could not be started.",
diff --git a/src/assets/i18n/french.json b/src/assets/i18n/french.json
index 8a1e790b..d9831e66 100644
--- a/src/assets/i18n/french.json
+++ b/src/assets/i18n/french.json
@@ -367,6 +367,7 @@
"death": "Événement de décès",
"future-duration": "Durée future",
"kill": "Tuer l'événement",
+ "manually": "Manuellement",
"name": "Rejouer",
"past-duration": "Durée passée",
"start-error": "La capture des événements n'a pas pu démarrer.",
diff --git a/src/assets/i18n/german.json b/src/assets/i18n/german.json
index 7127bd89..72393878 100644
--- a/src/assets/i18n/german.json
+++ b/src/assets/i18n/german.json
@@ -367,6 +367,7 @@
"death": "Todesereignis",
"future-duration": "Zukünftige Dauer",
"kill": "Tötungsereignis",
+ "manually": "Manuell",
"name": "Wiederholung",
"past-duration": "Vergangene Dauer",
"start-error": "Die Ereigniserfassung konnte nicht gestartet werden.",
diff --git a/src/assets/i18n/korean.json b/src/assets/i18n/korean.json
index d262c3b8..9f78fa3f 100644
--- a/src/assets/i18n/korean.json
+++ b/src/assets/i18n/korean.json
@@ -367,6 +367,7 @@
"death": "죽음의 사건",
"future-duration": "향후 기간",
"kill": "킬 이벤트",
+ "manually": "수동으로",
"name": "다시 하다",
"past-duration": "지난 기간",
"start-error": "이벤트 캡처를 시작할 수 없습니다.",
diff --git a/src/assets/i18n/polish.json b/src/assets/i18n/polish.json
index 2906141c..23dfa2d4 100644
--- a/src/assets/i18n/polish.json
+++ b/src/assets/i18n/polish.json
@@ -367,6 +367,7 @@
"death": "Zdarzenie śmierci",
"future-duration": "Przyszły czas trwania",
"kill": "Zabij zdarzenie",
+ "manually": "ręcznie",
"name": "Powtórna rozgrywka",
"past-duration": "Czas przeszły",
"start-error": "Nie można rozpocząć przechwytywania zdarzeń.",
diff --git a/src/assets/i18n/portuguese.json b/src/assets/i18n/portuguese.json
index d85aaf9e..da3bb759 100644
--- a/src/assets/i18n/portuguese.json
+++ b/src/assets/i18n/portuguese.json
@@ -367,6 +367,7 @@
"death": "Evento de morte",
"future-duration": "Duração futura",
"kill": "Matar evento",
+ "manually": "Manualmente",
"name": "Repetir",
"past-duration": "Duração passada",
"start-error": "A captura de eventos não pôde ser iniciada.",
diff --git a/src/assets/i18n/russian.json b/src/assets/i18n/russian.json
index b759f319..6df49e0d 100644
--- a/src/assets/i18n/russian.json
+++ b/src/assets/i18n/russian.json
@@ -367,6 +367,7 @@
"death": "Событие смерти",
"future-duration": "Будущая продолжительность",
"kill": "Убить событие",
+ "manually": "вручную",
"name": "переигровка",
"past-duration": "Прошлая продолжительность",
"start-error": "Захват событий не может быть начат.",
diff --git a/src/assets/i18n/simplified-chinese.json b/src/assets/i18n/simplified-chinese.json
index 032352b1..92451a4e 100644
--- a/src/assets/i18n/simplified-chinese.json
+++ b/src/assets/i18n/simplified-chinese.json
@@ -367,6 +367,7 @@
"death": "死亡事件",
"future-duration": "未来持续时间",
"kill": "杀死事件",
+ "manually": "手动地",
"name": "重播",
"past-duration": "过去的持续时间",
"start-error": "无法开始事件捕获。",
diff --git a/src/assets/i18n/spanish.json b/src/assets/i18n/spanish.json
index 97743271..1aa72dc3 100644
--- a/src/assets/i18n/spanish.json
+++ b/src/assets/i18n/spanish.json
@@ -367,6 +367,7 @@
"death": "Evento de muerte",
"future-duration": "Duración futura",
"kill": "Evento de muerte",
+ "manually": "a mano",
"name": "Repetición",
"past-duration": "Duración pasada",
"start-error": "No se pudo iniciar la captura de eventos.",
diff --git a/src/assets/i18n/thai.json b/src/assets/i18n/thai.json
index 7257b59f..5b4f678b 100644
--- a/src/assets/i18n/thai.json
+++ b/src/assets/i18n/thai.json
@@ -367,6 +367,7 @@
"death": "เหตุการณ์ความตาย",
"future-duration": "อนาคตระยะเวลา",
"kill": "ฆ่าเหตุการณ์",
+ "manually": "ด้วยมือ",
"name": "เล่นใหม่",
"past-duration": "ระยะเวลาที่ผ่านมา",
"start-error": "ไม่สามารถเริ่มต้นการจับภาพเหตุการณ์",
diff --git a/src/assets/i18n/traditional-chinese.json b/src/assets/i18n/traditional-chinese.json
index 8e59840a..e36a57e4 100644
--- a/src/assets/i18n/traditional-chinese.json
+++ b/src/assets/i18n/traditional-chinese.json
@@ -367,6 +367,7 @@
"death": "死亡事件",
"future-duration": "未來幾秒內",
"kill": "擊殺事件",
+ "manually": "手動地",
"name": "重播",
"past-duration": "過去幾秒內",
"start-error": "無法開始事件獲取。",