SL-14906 More adjustments to guidebook

The Guidebook should remember it's open/closed state between sessions.
The Guidebook button should show as pressed while the Guidebook is open.
meow-7.2.2
Andrey Kleshchev 2021-04-17 00:36:10 +03:00
parent 3780c86538
commit 8cd5d7c58a
3 changed files with 5 additions and 10 deletions

View File

@ -88,8 +88,10 @@
icon="Command_HowTo_Icon"
label_ref="Command_HowTo_Label"
tooltip_ref="Command_HowTo_Tooltip"
execute_function="Help.ToggleHowTo"
is_running_function="Help.HowToVisible"
execute_function="Floater.ToggleOrBringToFront"
execute_parameters="how_to"
is_running_function="Floater.IsOpen"
is_running_parameters="how_to"
/>
<command name="inventory"
available_in_toybox="true"

View File

@ -5000,13 +5000,6 @@ bool tools_visible_take_object()
return !is_selection_buy_not_take();
}
bool enable_how_to_visible(const LLSD& param)
{
LLFloaterWebContent::Params p;
p.target = "__help_how_to";
return LLFloaterReg::instanceVisible("how_to", p);
}
class LLToolsEnableBuyOrTake : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@ -9103,7 +9096,6 @@ void initialize_menus()
// Help menu
// most items use the ShowFloater method
view_listener_t::addMenu(new LLToggleHowTo(), "Help.ToggleHowTo");
enable.add("Help.HowToVisible", boost::bind(&enable_how_to_visible, _2));
// Advanced menu
view_listener_t::addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole");

View File

@ -10,6 +10,7 @@
min_width="335"
name="floater_how_to"
single_instance="true"
save_visibility="true"
save_rect="true"
title="WELCOME ISLAND GUIDEBOOK"
width="780"