Added a Reload cover for the AO

meow-7.2.2
ZiRee 2011-04-22 20:30:30 +02:00
parent c643cb18dd
commit 8de8315cce
4 changed files with 128 additions and 20 deletions

View File

@ -51,6 +51,13 @@ FloaterAO::~FloaterAO()
{
}
void FloaterAO::reloading(BOOL yes)
{
mReloadCoverPanel->setVisible(yes);
enableSetControls(!yes);
enableStateControls(!yes);
}
void FloaterAO::updateSetParameters()
{
mOverrideSitsCheckBox->setValue(mSelectedSet->getSitOverride());
@ -127,11 +134,15 @@ void FloaterAO::updateList()
}
}
enableSetControls(TRUE);
reloading(FALSE);
}
BOOL FloaterAO::postBuild()
{
LLPanel* aoPanel=getChild<LLPanel>("animation_overrider_panel");
mReloadCoverPanel=aoPanel->getChild<LLPanel>("ao_reload_cover");
mSetSelector=aoPanel->getChild<LLComboBox>("ao_set_selection_combo");
mActivateSetButton=aoPanel->getChild<LLButton>("ao_activate");
mAddButton=aoPanel->getChild<LLButton>("ao_add");
@ -302,8 +313,7 @@ void FloaterAO::onSelectState()
void FloaterAO::onClickReload()
{
enableSetControls(FALSE);
enableStateControls(FALSE);
reloading(TRUE);
mSelectedSet=0;
mSelectedState=0;
@ -334,8 +344,7 @@ BOOL FloaterAO::newSetCallback(const LLSD& notification,const LLSD& response)
{
if(AOEngine::instance().addSet(newSetName).notNull())
{
enableSetControls(FALSE);
enableStateControls(FALSE);
reloading(TRUE);
return TRUE;
}
}
@ -361,13 +370,12 @@ BOOL FloaterAO::removeSetCallback(const LLSD& notification,const LLSD& response)
{
if(AOEngine::instance().removeSet(mSelectedSet))
{
reloading(TRUE);
// to prevent snapping back to deleted set
mSetSelector->removeall();
// visually indicate there are no items left
mSetSelector->clear();
mAnimationList->deleteAllItems();
enableSetControls(FALSE);
enableStateControls(FALSE);
return TRUE;
}
}
@ -539,10 +547,9 @@ BOOL FloaterAO::handleDragAndDrop(S32 x,S32 y,MASK mask,BOOL drop,EDragAndDropTy
{
if(AOEngine::instance().importNotecard(item))
{
mImportRunning=TRUE;
enableSetControls(FALSE);
enableStateControls(FALSE);
reloading(TRUE);
mReloadButton->setEnabled(FALSE);
mImportRunning=TRUE;
}
}
}
@ -562,8 +569,7 @@ BOOL FloaterAO::handleDragAndDrop(S32 x,S32 y,MASK mask,BOOL drop,EDragAndDropTy
// TODO: this would be the right thing to do, but it blocks multi drop
// before final release this must be resolved
enableSetControls(FALSE);
enableStateControls(FALSE);
reloading(TRUE);
}
}
}

View File

@ -81,6 +81,8 @@ class FloaterAO
void onClickPrevious();
void onClickNext();
void reloading(BOOL yes);
void updateSmart();
void updateCycleParameters();
@ -94,6 +96,7 @@ class FloaterAO
AOSet* mSelectedSet;
AOSet::AOState* mSelectedState;
LLPanel* mReloadCoverPanel;
LLComboBox* mSetSelector;
LLButton* mActivateSetButton;
LLButton* mAddButton;

View File

@ -30,10 +30,10 @@
<panel
name="animation_overrider_panel"
filename="panel_ao.xml"
left="10"
top="20"
width="180"
height="330"
left="0"
top="16"
width="200"
height="334"
follows="all"
layout="topleft">
</panel>

View File

@ -1,12 +1,21 @@
<panel
name="animation_overrider_panel"
left="10"
top="4"
width="180"
height="306"
name="animation_overrider_outer panel"
left="0"
top="0"
width="200"
height="314"
follows="all"
layout="topleft">
<panel
name="animation_overrider_panel"
left="10"
top="4"
width="180"
height="306"
follows="all"
layout="topleft">
<combo_box
name="ao_set_selection_combo"
tool_tip="Select animation set to edit."
@ -277,4 +286,94 @@
</layout_panel>
</layout_stack>
</panel>
<panel
name="ao_reload_cover"
left="0"
top="0"
width="200"
height="315"
follows="all"
visible="true"
bg_alpha_color="Black_50"
bg_opaque_color="Black_50"
background_visible="true"
background_opaque="true"
mouse_opaque="true"
layout="topleft">
<panel
name="ao_reload_text_panel"
left="30"
top="110"
right="-30"
bottom="-110"
bg_alpha_color="Black_50"
bg_opaque_color="Black_50"
background_visible="true"
background_opaque="true"
follows="left|right|top">
<view_border
name="ao_reload_view_border"
left="0"
top="0"
right="-1"
bottom="-1"
follows="all" />
<text
left_delta="0"
top_delta="16"
halign="center"
valign="center"
follows="all">
Reloading Config
</text>
<text
v_pad="-4"
bottom="-16"
halign="center"
valign="center"
follows="all">
Please Wait
</text>
<layout_stack
name="ao_reload_indicator_layout_stack"
left="0"
top="31"
right="-1"
height="32"
orientation="horizontal"
follows="top|left|right">
<layout_panel
name="ao_reload_indicator_left_layout_panel"
width="160"
height="32"
user_resize="false">
</layout_panel>
<layout_panel
name="ao_reload_indicator_layout_panel"
width="32"
height="32"
auto_resize="false"
user_resize="false">
<loading_indicator
left="0"
top="0"
width="32"
height="32"
follows="right|top"
name="ao_reload_indicator" />
</layout_panel>
<layout_panel
name="ao_reload_indicator_right_layout_panel"
width="160"
height="32"
user_resize="false">
</layout_panel>
</layout_stack>
</panel>
</panel>
</panel>