mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-27 06:19:51 -05:00
Rename the property in the video player to reload instead of reset, and add some more explanation
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
||||
const std::unique_ptr<ghoul::opengl::Texture>& frameTexture() const;
|
||||
bool isInitialized() const;
|
||||
|
||||
void reset();
|
||||
void reload();
|
||||
void destroy();
|
||||
void update();
|
||||
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
properties::TriggerProperty _play;
|
||||
properties::TriggerProperty _pause;
|
||||
properties::TriggerProperty _goToStart;
|
||||
properties::TriggerProperty _reset;
|
||||
properties::TriggerProperty _reload;
|
||||
properties::BoolProperty _playAudio;
|
||||
properties::BoolProperty _loopVideo;
|
||||
|
||||
|
||||
@@ -60,13 +60,14 @@ namespace {
|
||||
constexpr openspace::properties::Property::PropertyInfo GoToStartInfo = {
|
||||
"GoToStart",
|
||||
"Go To Start",
|
||||
"Go to start in video"
|
||||
"Sets the time to the beginning of the video and pauses it."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo ResetInfo = {
|
||||
"Reset",
|
||||
"Reset",
|
||||
"Reset video"
|
||||
constexpr openspace::properties::Property::PropertyInfo ReloadInfo = {
|
||||
"Reload",
|
||||
"Reload",
|
||||
"Reloads the video and creates a new texture. This might be useful in case there "
|
||||
"was an error loading the video."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo AudioInfo = {
|
||||
@@ -249,7 +250,7 @@ VideoPlayer::VideoPlayer(const ghoul::Dictionary& dictionary)
|
||||
, _play(PlayInfo)
|
||||
, _pause(PauseInfo)
|
||||
, _goToStart(GoToStartInfo)
|
||||
, _reset(ResetInfo)
|
||||
, _reload(ReloadInfo)
|
||||
, _playAudio(AudioInfo, false)
|
||||
, _loopVideo(LoopVideoInfo, true)
|
||||
{
|
||||
@@ -260,8 +261,8 @@ VideoPlayer::VideoPlayer(const ghoul::Dictionary& dictionary)
|
||||
_videoFile = p.video;
|
||||
_loopVideo = p.loopVideo.value_or(_loopVideo);
|
||||
|
||||
_reset.onChange([this]() { reset(); });
|
||||
addProperty(_reset);
|
||||
_reload.onChange([this]() { reload(); });
|
||||
addProperty(_reload);
|
||||
|
||||
if (p.playbackMode.has_value()) {
|
||||
switch (*p.playbackMode) {
|
||||
@@ -781,7 +782,7 @@ const std::unique_ptr<ghoul::opengl::Texture>& VideoPlayer::frameTexture() const
|
||||
return _frameTexture;
|
||||
}
|
||||
|
||||
void VideoPlayer::reset() {
|
||||
void VideoPlayer::reload() {
|
||||
if (_videoFile.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void VideoTileProvider::update() {
|
||||
}
|
||||
|
||||
void VideoTileProvider::reset() {
|
||||
_videoPlayer.reset();
|
||||
_videoPlayer.reload();
|
||||
}
|
||||
|
||||
ChunkTile VideoTileProvider::chunkTile(TileIndex tileIndex, int parents, int maxParents) {
|
||||
|
||||
Reference in New Issue
Block a user