Addressed review comments

- Renamed `IVideo.CurrentFrameNumber` to `CurrentFrameIndex`
 - Improved logged error message in VideoPlayerWidget
 - Renumbered fields in ThreadedGraphicsContext
This commit is contained in:
penev92
2022-01-09 22:54:54 +02:00
committed by Matthias Mailänder
parent 248b8d1102
commit 860ec642b8
6 changed files with 34 additions and 34 deletions

View File

@@ -180,7 +180,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
frameSlider.GetValue = () =>
{
if (isVideoLoaded)
return player.Video.CurrentFrameNumber;
return player.Video.CurrentFrameIndex;
if (currentSound != null)
return currentSound.SeekPosition * currentSoundFormat.SampleRate;
@@ -197,7 +197,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
frameText.GetText = () =>
{
if (isVideoLoaded)
return $"{player.Video.CurrentFrameNumber + 1} / {player.Video.FrameCount}";
return $"{player.Video.CurrentFrameIndex + 1} / {player.Video.FrameCount}";
if (currentSoundFormat != null)
return $"{Math.Round(currentSoundFormat.LengthInSeconds, 3)} sec";