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 t0 = std::chrono::steady_clock::now();
|
||||
bool app_starting = start_time != std::chrono::steady_clock::time_point{} and
|
||||
t0 - start_time < 10s and
|
||||
stream.current_state() != scenes::stream::state::streaming;
|
||||
t0 - start_time < 10s;
|
||||
|
||||
auto cancel_size = ImGui::CalcTextSize(cancel.c_str());
|
||||
|
||||
|
||||
@@ -60,6 +60,11 @@ public:
|
||||
// cancel: text to display on the quit/disconnect/cancel button
|
||||
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_icon && icon);
|
||||
};
|
||||
|
||||
@@ -526,6 +526,7 @@ void scenes::stream::on_unfocused()
|
||||
clear_swapchains();
|
||||
left_hand.reset();
|
||||
right_hand.reset();
|
||||
apps.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}))
|
||||
{
|
||||
apps.reset();
|
||||
network_session->send_control(from_headset::get_application_list{
|
||||
.language = application::get_messages_info().language,
|
||||
.country = application::get_messages_info().country,
|
||||
|
||||
Reference in New Issue
Block a user