Reset spinner when going back to launcher
This commit is contained in:
@@ -116,8 +116,7 @@ app_launcher::clicked app_launcher::draw_gui(imgui_context & imgui_ctx, const st
|
|||||||
auto res = clicked::None;
|
auto res = clicked::None;
|
||||||
auto t0 = std::chrono::steady_clock::now();
|
auto t0 = std::chrono::steady_clock::now();
|
||||||
bool app_starting = start_time != std::chrono::steady_clock::time_point{} and
|
bool app_starting = start_time != std::chrono::steady_clock::time_point{} and
|
||||||
t0 - start_time < 10s and
|
t0 - start_time < 10s;
|
||||||
stream.current_state() != scenes::stream::state::streaming;
|
|
||||||
|
|
||||||
auto cancel_size = ImGui::CalcTextSize(cancel.c_str());
|
auto cancel_size = ImGui::CalcTextSize(cancel.c_str());
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ public:
|
|||||||
// cancel: text to display on the quit/disconnect/cancel button
|
// cancel: text to display on the quit/disconnect/cancel button
|
||||||
clicked draw_gui(imgui_context &, const std::string & cancel);
|
clicked draw_gui(imgui_context &, const std::string & cancel);
|
||||||
|
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
|
start_time = {};
|
||||||
|
}
|
||||||
|
|
||||||
void operator()(wivrn::to_headset::application_list && apps);
|
void operator()(wivrn::to_headset::application_list && apps);
|
||||||
void operator()(wivrn::to_headset::application_icon && icon);
|
void operator()(wivrn::to_headset::application_icon && icon);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -526,6 +526,7 @@ void scenes::stream::on_unfocused()
|
|||||||
clear_swapchains();
|
clear_swapchains();
|
||||||
left_hand.reset();
|
left_hand.reset();
|
||||||
right_hand.reset();
|
right_hand.reset();
|
||||||
|
apps.reset();
|
||||||
|
|
||||||
imgui_ctx.reset();
|
imgui_ctx.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -979,6 +979,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
|
|||||||
|
|
||||||
if (RadioButtonWithoutCheckBox(ICON_FA_ROCKET " " + _("Start"), gui_status, gui_status::application_launcher, {tab_width, 0}))
|
if (RadioButtonWithoutCheckBox(ICON_FA_ROCKET " " + _("Start"), gui_status, gui_status::application_launcher, {tab_width, 0}))
|
||||||
{
|
{
|
||||||
|
apps.reset();
|
||||||
network_session->send_control(from_headset::get_application_list{
|
network_session->send_control(from_headset::get_application_list{
|
||||||
.language = application::get_messages_info().language,
|
.language = application::get_messages_info().language,
|
||||||
.country = application::get_messages_info().country,
|
.country = application::get_messages_info().country,
|
||||||
|
|||||||
Reference in New Issue
Block a user