ACME-612 : Implemented a loading indicator for the map tile when it's loading, also disable the checkbox during that time
parent
fa48ae8741
commit
ec09ce526b
|
|
@ -34,6 +34,7 @@
|
|||
#include "llfacebookconnect.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llloadingindicator.h"
|
||||
#include "llslurl.h"
|
||||
#include "llviewerregion.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
|
@ -453,8 +454,12 @@ void LLFloaterSocial::draw()
|
|||
mMapTexture->setBoostLevel(LLGLTexture::BOOST_MAP);
|
||||
mReloadingMapTexture = true;
|
||||
// In the meantime, put back the "loading" placeholder in the map widget
|
||||
getChild<LLIconCtrl>("map_placeholder")->setImage(mMapPlaceholder);
|
||||
}
|
||||
getChild<LLLoadingIndicator>("map_loading_indicator")->setVisible(true);
|
||||
getChild<LLIconCtrl>("map_placeholder")->setVisible(false);
|
||||
mMapCheckBoxValue = getChild<LLCheckBoxCtrl>("add_place_view_cb")->get();
|
||||
getChild<LLCheckBoxCtrl>("add_place_view_cb")->set(false);
|
||||
getChild<LLCheckBoxCtrl>("add_place_view_cb")->setEnabled(false);
|
||||
}
|
||||
// Are we done loading the map tile?
|
||||
if (mReloadingMapTexture && mMapTexture->isFullyLoaded())
|
||||
{
|
||||
|
|
@ -464,6 +469,11 @@ void LLFloaterSocial::draw()
|
|||
LLPointer<LLUIImage> ui_image = new LLUIImage(mMapUrl, mMapTexture);
|
||||
// Point map widget to correct map tile
|
||||
getChild<LLIconCtrl>("map_placeholder")->setImage(ui_image);
|
||||
// Switch visibility
|
||||
getChild<LLLoadingIndicator>("map_loading_indicator")->setVisible(false);
|
||||
getChild<LLIconCtrl>("map_placeholder")->setVisible(true);
|
||||
getChild<LLCheckBoxCtrl>("add_place_view_cb")->setEnabled(true);
|
||||
getChild<LLCheckBoxCtrl>("add_place_view_cb")->set(mMapCheckBoxValue);
|
||||
}
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ private:
|
|||
LLPointer<LLViewerFetchedTexture> mMapTexture;
|
||||
LLPointer<LLUIImage> mMapPlaceholder;
|
||||
bool mReloadingMapTexture;
|
||||
bool mMapCheckBoxValue;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERSOCIAL_H
|
||||
|
|
|
|||
|
|
@ -379,16 +379,25 @@
|
|||
<layout_panel
|
||||
name="place_map_panel"
|
||||
height="133">
|
||||
<icon
|
||||
<loading_indicator
|
||||
follows="left|top"
|
||||
height="128"
|
||||
width="128"
|
||||
image_name="Map_Placeholder_Icon"
|
||||
layout="topleft"
|
||||
top="5"
|
||||
left="9"
|
||||
name="map_placeholder">
|
||||
</icon>
|
||||
height="24"
|
||||
width="24"
|
||||
name="map_loading_indicator"
|
||||
top="57"
|
||||
left="61"
|
||||
visible="true"/>
|
||||
<icon
|
||||
follows="left|top"
|
||||
height="128"
|
||||
width="128"
|
||||
image_name="Map_Placeholder_Icon"
|
||||
layout="topleft"
|
||||
top="5"
|
||||
left="9"
|
||||
visible="false"
|
||||
name="map_placeholder">
|
||||
</icon>
|
||||
<check_box
|
||||
follows="left|top"
|
||||
initial_value="true"
|
||||
|
|
|
|||
Loading…
Reference in New Issue