Power User implemented. Certain functions are only activated if you accept the consequences.
Some attempts to get the Texture Preview window working correctly. Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
#include "llvoavatar.h"
|
||||
#include "llhudeffectlookat.h"
|
||||
#include "llagent.h"
|
||||
#include "llaudioengine.h" //For POWER USER affirmation.
|
||||
#include "llfloaterchat.h" //For POWER USER affirmation.
|
||||
#include "llstartup.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "lluictrlfactory.h"
|
||||
@@ -74,6 +76,7 @@ private:
|
||||
//always show Build
|
||||
BOOL mAlwaysShowFly;
|
||||
//Disable camera minimum distance
|
||||
BOOL mPowerUser;
|
||||
//Chat/IM -----------------------------------------------------------------------------
|
||||
BOOL mHideNotificationsInChat;
|
||||
BOOL mPlayTypingSound;
|
||||
@@ -152,6 +155,7 @@ void LLPrefsAscentSysImpl::refreshValues()
|
||||
//always show Build
|
||||
mAlwaysShowFly = gSavedSettings.getBOOL("AscentFlyAlwaysEnabled");
|
||||
//Disable camera minimum distance
|
||||
mPowerUser = gSavedSettings.getBOOL("AscentPowerfulWizard");
|
||||
//Chat/IMs ----------------------------------------------------------------------------
|
||||
mHideNotificationsInChat = gSavedSettings.getBOOL("HideNotificationsInChat");
|
||||
mHideTypingNotification = gSavedSettings.getBOOL("AscentHideTypingNotification");
|
||||
@@ -199,6 +203,8 @@ void LLPrefsAscentSysImpl::refresh()
|
||||
//always show Build
|
||||
childSetValue("always_fly_check", mAlwaysShowFly);
|
||||
//Disable camera minimum distance
|
||||
childSetValue("power_user_check", mPowerUser);
|
||||
childSetValue("power_user_confirm_check", mPowerUser);
|
||||
//Chat --------------------------------------------------------------------------------
|
||||
childSetValue("hide_notifications_in_chat_check", mHideNotificationsInChat);
|
||||
childSetValue("play_typing_sound_check", mPlayTypingSound);
|
||||
@@ -341,7 +347,17 @@ void LLPrefsAscentSysImpl::apply()
|
||||
//always show Build
|
||||
gSavedSettings.setBOOL("AscentFlyAlwaysEnabled", childGetValue("always_fly_check"));
|
||||
//Disable camera minimum distance
|
||||
|
||||
gSavedSettings.setBOOL("AscentPowerfulWizard", (childGetValue("power_user_check") && childGetValue("power_user_confirm_check")));
|
||||
if (gSavedSettings.getBOOL("AscentPowerfulWizard") && !mPowerUser)
|
||||
{
|
||||
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = llformat("You are bestowed with powers beyond mortal comprehension.\nUse your newfound abilities wisely.\nUnlocked:\n- Animation Priority up to 7 - Meant for animations that should override anything and everything at all times. DO NOT USE THIS FOR GENERAL ANIMATIONS.\n- Right click > Destroy objects - Permanently deletes an object immediately, when you don't feel like waiting for the server to respond.\n- Right Click > Explode objects - Turns and object physical, temporary, and delinks it.");
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
//
|
||||
//Chat/IM ------------------------------------------------------------------------------
|
||||
//Use Vertical IMs
|
||||
//Script count
|
||||
@@ -438,6 +454,7 @@ void LLPrefsAscentSysImpl::apply()
|
||||
gSavedSettings.setBOOL("RevokePermsOnStandUp", childGetValue("revoke_perms_on_stand_up_check"));
|
||||
|
||||
refreshValues();
|
||||
refresh();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file ascentuploadbrowser.h
|
||||
* @Author Duncan Garrett
|
||||
* Meant as a replacement to using Windows' file browser for uploads.
|
||||
* @Author Duncan Garrett (Hg Beeks)
|
||||
* Meant as a replacement to using a system file browser for uploads.
|
||||
*
|
||||
* Created August 27 2010
|
||||
*
|
||||
@@ -42,10 +42,12 @@ ASFloaterUploadBrowser::ASFloaterUploadBrowser()
|
||||
: LLFloater(std::string("floater_upload_browser"), std::string("FloaterUploadRect"), LLStringUtil::null)
|
||||
{
|
||||
mPathName = "C:\\Users\\Duncan\\Documents"+gDirUtilp->getDirDelimiter(); //(gDirUtilp->getSkinBaseDir()+gDirUtilp->getDirDelimiter());
|
||||
mFilterType = "None";
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_upload_browser.xml");
|
||||
mFileList = getChild<LLScrollListCtrl>("file_list");
|
||||
childSetCommitCallback("file_list", onClickFile, this);
|
||||
childSetDoubleClickCallback("file_list", onDoubleClick);
|
||||
childSetCommitCallback("file_filter_combo", onUpdateFilter, this);
|
||||
refresh();
|
||||
mFileList->sortByColumn(std::string("file_name"), TRUE);
|
||||
mFileList->sortByColumn(std::string("file_type"), TRUE);
|
||||
@@ -63,6 +65,20 @@ void ASFloaterUploadBrowser::onClickFile(LLUICtrl* ctrl, void* user_data)
|
||||
panelp->refreshUploadOptions();
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::onUpdateFilter(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
llinfos << "Filter change triggered." << llendl;
|
||||
ASFloaterUploadBrowser* panelp = (ASFloaterUploadBrowser*)user_data;
|
||||
LLComboBox* combo = panelp->getChild<LLComboBox>("file_filter_combo");
|
||||
if (combo->getSelectedValue().asString() != panelp->mFilterType)
|
||||
{
|
||||
llinfos << "Selection is new, rebuilding file list." << llendl;
|
||||
panelp->mFilterType.clear();
|
||||
panelp->mFilterType = combo->getSelectedValue().asString().c_str();
|
||||
panelp->refreshUploadOptions();
|
||||
}
|
||||
}
|
||||
|
||||
void ASFloaterUploadBrowser::refreshUploadOptions()
|
||||
{
|
||||
if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FILE)
|
||||
@@ -95,10 +111,10 @@ void ASFloaterUploadBrowser::handleDoubleClick()
|
||||
}
|
||||
else if (mFileList->getFirstSelected()->getColumn(LIST_FILE_TYPE)->getValue().asInteger() == LIST_TYPE_FOLDER)
|
||||
{
|
||||
/*std::string newPath = (mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString()+gDirUtilp->getDirDelimiter());
|
||||
newPath = (mPathName+newPath);
|
||||
std::string newPath = (mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString()+gDirUtilp->getDirDelimiter());
|
||||
/*newPath = (mPathName+newPath);
|
||||
mPathName = newPath.c_str();*/
|
||||
llinfos << "Double-clicked Folder. Directory should change to " << mPathName << mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString() << llendl;
|
||||
llinfos << "Double-clicked Folder. Directory should change to " << mPathName << mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString() << "!!" << llendl;
|
||||
//mPathName.append(mFileList->getFirstSelected()->getColumn(LIST_FILE_NAME)->getValue().asString().c_str() + gDirUtilp->getDirDelimiter());
|
||||
refresh();
|
||||
}
|
||||
@@ -110,16 +126,17 @@ void ASFloaterUploadBrowser::refresh()
|
||||
mFileList->deleteAllItems();
|
||||
llinfos << "Getting file listing at " << mPathName << llendl;
|
||||
bool found = true;
|
||||
U32 fileCount = gDirUtilp->countFilesInDir(mPathName, "*.*");
|
||||
while(found)
|
||||
{
|
||||
std::string filename;
|
||||
found = gDirUtilp->getNextFileInDir(mPathName, "*.*", filename, false);
|
||||
fileCount++;
|
||||
//llinfo
|
||||
if(found)
|
||||
{
|
||||
|
||||
S32 periodIndex = filename.find_last_of(".");
|
||||
std::string extension = filename.substr(periodIndex + 1, filename.length() - 1);
|
||||
llinfos << extension << llendl;
|
||||
LLSD element;
|
||||
element["path"] = mPathName + filename;
|
||||
|
||||
@@ -137,20 +154,20 @@ void ASFloaterUploadBrowser::refresh()
|
||||
invtype_column["type"] = "icon";
|
||||
invtype_column["value"] = "inv_folder_trash.tga";
|
||||
|
||||
if ((extension == "jpeg")||(extension == "jpg")||(extension == "tga")
|
||||
||(extension == "png")||(extension == "bmp"))
|
||||
if (((extension == "jpeg")||(extension == "jpg")||(extension == "tga")
|
||||
||(extension == "png")||(extension == "bmp"))&&((mFilterType == "None")||(mFilterType == "Texture")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_texture.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if (extension == "wav")
|
||||
else if ((extension == "wav")&&((mFilterType == "None")||(mFilterType == "Sound")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_sound.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
filetype_column["value"] = LIST_TYPE_FILE;
|
||||
}
|
||||
else if ((extension == "bvh")||(extension == "anim"))
|
||||
else if (((extension == "bvh")||(extension == "anim"))&&((mFilterType == "None")||(mFilterType == "Animation")))
|
||||
{
|
||||
invtype_column["value"] = "inv_item_animation.tga";
|
||||
filename_column["value"] = filename.substr(0, periodIndex);
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
ASFloaterUploadBrowser();
|
||||
virtual ~ASFloaterUploadBrowser();
|
||||
static void onClickFile(LLUICtrl* ctrl, void* user_data);
|
||||
static void onUpdateFilter(LLUICtrl* ctrl, void* user_data);
|
||||
static void onDoubleClick(void* user_data);
|
||||
|
||||
void refresh();
|
||||
@@ -50,6 +51,7 @@ private:
|
||||
};
|
||||
LLScrollListCtrl* mFileList;
|
||||
std::string mPathName;
|
||||
std::string mFilterType;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -189,6 +189,11 @@ BOOL LLFloaterAnimPreview::postBuild()
|
||||
|
||||
childSetCommitCallback("name_form", onCommitName, this);
|
||||
|
||||
if (gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||
{
|
||||
childSetMaxValue("priority", 7);
|
||||
}
|
||||
|
||||
childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount));
|
||||
childSetAction("ok_btn", onBtnOK, this);
|
||||
setDefaultBtn();
|
||||
|
||||
@@ -462,9 +462,47 @@ void LLFloaterTools::refresh()
|
||||
|
||||
// Refresh object and prim count labels
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
std::string obj_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
|
||||
childSetTextArg("obj_count", "[COUNT]", obj_count_string);
|
||||
// Added in Link Num value -HgB
|
||||
S32 object_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
|
||||
S32 prim_count = LLSelectMgr::getInstance()->getEditSelection()->getObjectCount();
|
||||
std::string value_string;
|
||||
std::string desc_string;
|
||||
if ((gSavedSettings.getBOOL("EditLinkedParts"))&&(prim_count == 1)) //Selecting a single prim in "Edit Linked" mode, show link number
|
||||
{
|
||||
desc_string = "Link number:";
|
||||
|
||||
LLViewerObject* selected = LLSelectMgr::getInstance()->getSelection()->getFirstObject();
|
||||
if (selected && selected->getRootEdit())
|
||||
{
|
||||
LLViewerObject::child_list_t children = selected->getRootEdit()->getChildren();
|
||||
if (children.empty())
|
||||
{
|
||||
value_string = "0"; // An unlinked prim is "link 0".
|
||||
}
|
||||
else
|
||||
{
|
||||
children.push_front(selected->getRootEdit()); // need root in the list too
|
||||
S32 index = 0;
|
||||
for (LLViewerObject::child_list_t::iterator iter = children.begin(); iter != children.end(); ++iter)
|
||||
{
|
||||
index++;
|
||||
if ((*iter)->isSelected())
|
||||
{
|
||||
LLResMgr::getInstance()->getIntegerString(value_string, index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
desc_string = "Selected objects:";
|
||||
LLResMgr::getInstance()->getIntegerString(value_string, object_count);
|
||||
}
|
||||
childSetTextArg("link_num_obj_count", "[DESC]", desc_string);
|
||||
childSetTextArg("link_num_obj_count", "[NUM]", value_string);
|
||||
|
||||
std::string prim_count_string;
|
||||
LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount());
|
||||
childSetTextArg("prim_count", "[COUNT]", prim_count_string);
|
||||
@@ -747,7 +785,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
|
||||
childSetVisible("Strength:", land_visible);
|
||||
}
|
||||
|
||||
childSetVisible("obj_count", !land_visible);
|
||||
childSetVisible("link_num_obj_count", !land_visible);
|
||||
childSetVisible("prim_count", !land_visible);
|
||||
mTab->setVisible(!land_visible);
|
||||
mPanelLandInfo->setVisible(land_visible);
|
||||
|
||||
@@ -498,13 +498,14 @@ void LLInventoryView::init(LLInventoryModel* inventory)
|
||||
addBoolControl("Inventory.FoldersAlwaysByName", sort_folders_by_name );
|
||||
addBoolControl("Inventory.SystemFoldersToTop", sort_system_folders_to_top );
|
||||
|
||||
|
||||
//Search Controls - RKeast
|
||||
U32 search_type = gSavedPerAccountSettings.getU32("rkeastInventorySearchType");
|
||||
BOOL search_by_name = (search_type == 0);
|
||||
|
||||
addBoolControl("Inventory.SearchByName", search_by_name);
|
||||
addBoolControl("Inventory.SearchByCreator", !search_by_name);
|
||||
addBoolControl("Inventory.SearchByDesc", !search_by_name);
|
||||
addBoolControl("Inventory.SearchByUUID", !search_by_name);
|
||||
|
||||
addBoolControl("Inventory.SearchByAll", !search_by_name);
|
||||
|
||||
@@ -608,6 +609,9 @@ BOOL LLInventoryView::postBuild()
|
||||
childSetTabChangeCallback("inventory filter tabs", "Recent Items", onFilterSelected, this);
|
||||
childSetTabChangeCallback("inventory filter tabs", "Worn Items", onFilterSelected, this);
|
||||
|
||||
childSetAction("Inventory.ResetAll",onResetAll,this);
|
||||
childSetAction("Inventory.ExpandAll",onExpandAll,this);
|
||||
|
||||
//panel->getFilter()->markDefault();
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1340,6 +1344,38 @@ void LLInventoryView::refreshQuickFilter(LLUICtrl* ctrl)
|
||||
// return FALSE;
|
||||
// }
|
||||
|
||||
|
||||
//static
|
||||
void LLInventoryView::onResetAll(void* userdata)
|
||||
{
|
||||
LLInventoryView* self = (LLInventoryView*) userdata;
|
||||
self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs");
|
||||
|
||||
if (!self->mActivePanel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (self->mActivePanel && self->mSearchEditor)
|
||||
{
|
||||
self->mSearchEditor->setText(LLStringUtil::null);
|
||||
}
|
||||
self->onSearchEdit("",userdata);
|
||||
self->mActivePanel->closeAllFolders();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLInventoryView::onExpandAll(void* userdata)
|
||||
{
|
||||
LLInventoryView* self = (LLInventoryView*) userdata;
|
||||
self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs");
|
||||
|
||||
if (!self->mActivePanel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
self->mActivePanel->openAllFolders();
|
||||
}
|
||||
|
||||
//static
|
||||
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
|
||||
{
|
||||
|
||||
@@ -293,6 +293,8 @@ public:
|
||||
static void refreshQuickFilter(LLUICtrl* ctrl);
|
||||
|
||||
static void onFilterSelected(void* userdata, bool from_click);
|
||||
static void onResetAll(void* userdata);
|
||||
static void onExpandAll(void* userdata);
|
||||
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
|
||||
|
||||
const std::string getFilterSubString() { return mActivePanel->getFilterSubString(); }
|
||||
|
||||
@@ -2080,7 +2080,7 @@ void LLPanelAvatar::processAvatarPropertiesReply(LLMessageSystem *msg, void**)
|
||||
args["[PAYMENTINFO]"] = self->mPanelSecondLife->getString(payment_text);
|
||||
std::string age_text = age_verified ? "AgeVerified" : "NotAgeVerified";
|
||||
// Do not display age verification status at this time
|
||||
//args["[[AGEVERIFICATION]]"] = self->mPanelSecondLife->getString(age_text);
|
||||
args["[[AGEVERIFICATION]]"] = self->mPanelSecondLife->getString(age_text);
|
||||
args["[AGEVERIFICATION]"] = " ";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -751,10 +751,7 @@ BOOL LLTaskCategoryBridge::renameItem(const std::string& new_name)
|
||||
|
||||
BOOL LLTaskCategoryBridge::isItemRemovable()
|
||||
{
|
||||
// <edit>
|
||||
//return FALSE;
|
||||
return TRUE;
|
||||
// </edit>
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LLTaskCategoryBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
#include "lluictrlfactory.h"
|
||||
#include "llviewerwindow.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "llfloateravatarinfo.h"
|
||||
|
||||
|
||||
const S32 PREVIEW_TEXTURE_MIN_WIDTH = 300;
|
||||
const S32 PREVIEW_TEXTURE_MIN_HEIGHT = 120;
|
||||
@@ -61,6 +63,7 @@ const S32 CLIENT_RECT_VPAD = 4;
|
||||
|
||||
const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f;
|
||||
|
||||
LLPreviewTexture * LLPreviewTexture::sInstance;
|
||||
LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
||||
const LLRect& rect,
|
||||
const std::string& title,
|
||||
@@ -74,7 +77,8 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
||||
mIsCopyable(FALSE),
|
||||
mLastHeight(0),
|
||||
mLastWidth(0),
|
||||
mAspectRatio(0.f)
|
||||
mAspectRatio(0.f),
|
||||
mCreatorKey(LLUUID())
|
||||
{
|
||||
const LLInventoryItem *item = getItem();
|
||||
if(item)
|
||||
@@ -117,7 +121,8 @@ LLPreviewTexture::LLPreviewTexture(
|
||||
const LLRect& rect,
|
||||
const std::string& title,
|
||||
const LLUUID& asset_id,
|
||||
BOOL copy_to_inv)
|
||||
BOOL copy_to_inv,
|
||||
BOOL copyable)
|
||||
:
|
||||
LLPreview(
|
||||
name,
|
||||
@@ -132,7 +137,7 @@ LLPreviewTexture::LLPreviewTexture(
|
||||
mLoadingFullImage( FALSE ),
|
||||
mShowKeepDiscard(FALSE),
|
||||
mCopyToInv(copy_to_inv),
|
||||
mIsCopyable(copy_to_inv),
|
||||
mIsCopyable(copyable),
|
||||
mLastHeight(0),
|
||||
mLastWidth(0),
|
||||
mAspectRatio(0.f)
|
||||
@@ -141,7 +146,6 @@ LLPreviewTexture::LLPreviewTexture(
|
||||
init();
|
||||
|
||||
setTitle(title);
|
||||
|
||||
LLRect curRect = getRect();
|
||||
translate(curRect.mLeft - rect.mLeft, curRect.mTop - rect.mTop);
|
||||
|
||||
@@ -155,53 +159,41 @@ LLPreviewTexture::~LLPreviewTexture()
|
||||
getWindow()->decBusyCount();
|
||||
}
|
||||
|
||||
if(mImage.notNull())
|
||||
{
|
||||
mImage->destroySavedRawImage() ;
|
||||
}
|
||||
mImage = NULL;
|
||||
sInstance = NULL;
|
||||
}
|
||||
|
||||
|
||||
void LLPreviewTexture::init()
|
||||
{
|
||||
sInstance = this;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(sInstance,"floater_preview_texture.xml");
|
||||
|
||||
childSetVisible("desc", !mCopyToInv); // Hide description field for embedded textures
|
||||
childSetVisible("desc txt", !mCopyToInv);
|
||||
childSetVisible("Copy To Inventory", mCopyToInv);
|
||||
childSetVisible("Keep", mShowKeepDiscard);
|
||||
childSetVisible("Discard", mShowKeepDiscard);
|
||||
childSetAction("openprofile", onClickProfile, this);
|
||||
|
||||
/*if (mCopyToInv)
|
||||
llinfos << "Image has alpha :" << mImage->getIsAlphaMask() << llendl;
|
||||
if (mCopyToInv)
|
||||
{
|
||||
llinfos << "Loading embedded" << llendl;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_embedded_texture.xml");
|
||||
|
||||
childSetAction("Copy To Inventory",LLPreview::onBtnCopyToInv,this);
|
||||
}
|
||||
|
||||
else if (mShowKeepDiscard)
|
||||
{
|
||||
llinfos << "Loading Keep/Discard" << llendl;
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture_keep_discard.xml");
|
||||
|
||||
childSetAction("Keep",onKeepBtn,this);
|
||||
childSetAction("Discard",onDiscardBtn,this);
|
||||
}
|
||||
|
||||
else
|
||||
{*/
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this,"floater_preview_texture.xml");
|
||||
childSetVisible("Copy To Inventory", mCopyToInv);
|
||||
childSetVisible("Keep", mShowKeepDiscard);
|
||||
childSetVisible("Discard", mShowKeepDiscard);
|
||||
llinfos << "Image has alpha :" << mImage->getIsAlphaMask() << llendl;
|
||||
|
||||
//}
|
||||
|
||||
|
||||
if (!mCopyToInv)
|
||||
{
|
||||
const LLInventoryItem* item = getItem();
|
||||
|
||||
if (item)
|
||||
{
|
||||
childSetCommitCallback("desc", LLPreview::onText, this);
|
||||
childSetText("desc", item->getDescription());
|
||||
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
||||
}
|
||||
|
||||
// If the buttons are hidden move stuff down to use the space.
|
||||
|
||||
LLRect keep_rect, old_rect, new_rect;
|
||||
@@ -212,30 +204,51 @@ void LLPreviewTexture::init()
|
||||
|
||||
diff = old_rect.mBottom - keep_rect.mBottom;
|
||||
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||
old_rect.getWidth(), old_rect.getHeight());
|
||||
childSetRect("combo_aspect_ratio", new_rect);
|
||||
|
||||
childGetRect("aspect_ratio", old_rect);
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||
old_rect.getWidth(), old_rect.getHeight());
|
||||
childSetRect("aspect_ratio", new_rect);
|
||||
|
||||
childGetRect("dimensions", old_rect);
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff - 3,
|
||||
new_rect.setOriginAndSize(old_rect.mLeft, old_rect.mBottom - diff,
|
||||
old_rect.getWidth(), old_rect.getHeight());
|
||||
childSetRect("dimensions", new_rect);
|
||||
}
|
||||
|
||||
|
||||
if (!mCopyToInv)
|
||||
{
|
||||
const LLInventoryItem* item = getItem();
|
||||
|
||||
if (item)
|
||||
{
|
||||
mCreatorKey = item->getCreatorUUID();
|
||||
childSetCommitCallback("desc", LLPreview::onText, this);
|
||||
childSetText("desc", item->getDescription());
|
||||
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
||||
childSetText("uuid", getItemID().asString());
|
||||
childSetText("uploader", getItemCreatorName());
|
||||
childSetText("uploadtime", getItemCreationDate());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this);
|
||||
LLComboBox* combo = getChild<LLComboBox>("combo_aspect_ratio");
|
||||
combo->setCurrentByIndex(0);
|
||||
}
|
||||
|
||||
void LLPreviewTexture::callbackLoadAvatarName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
|
||||
{
|
||||
if (!sInstance) return;
|
||||
std::ostringstream fullname;
|
||||
fullname << first << " " << last;
|
||||
sInstance->childSetText("uploader", fullname.str());
|
||||
}
|
||||
|
||||
void LLPreviewTexture::draw()
|
||||
{
|
||||
updateDimensions();
|
||||
@@ -268,7 +281,11 @@ void LLPreviewTexture::draw()
|
||||
// Pump the texture priority
|
||||
F32 pixel_area = mLoadingFullImage ? (F32)MAX_IMAGE_AREA : (F32)(interior.getWidth() * interior.getHeight() );
|
||||
mImage->addTextureStats( pixel_area );
|
||||
|
||||
if(pixel_area > 0.f)
|
||||
{
|
||||
//boost the previewed image priority to the highest to make it to get loaded first.
|
||||
mImage->setAdditionalDecodePriority(1.0f) ;
|
||||
}
|
||||
// Don't bother decoding more than we can display, unless
|
||||
// we're loading the full image.
|
||||
if (!mLoadingFullImage)
|
||||
@@ -319,7 +336,7 @@ void LLPreviewTexture::draw()
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( !mSavedFileTimer.hasExpired() )
|
||||
else if(!mSavedFileTimer.hasExpired())
|
||||
{
|
||||
// *TODO: Translate
|
||||
LLFontGL::getFontSansSerif()->renderUTF8(std::string("File Saved"), 0,
|
||||
@@ -448,6 +465,7 @@ std::string LLPreviewTexture::getItemCreatorName()
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(item->getCreatorUUID(), name);
|
||||
mCreatorKey = item->getCreatorUUID();
|
||||
return name;
|
||||
}
|
||||
return "Unknown";
|
||||
@@ -471,11 +489,10 @@ void LLPreviewTexture::updateDimensions()
|
||||
S32 max_client_width = gViewerWindow->getWindowWidth() - horiz_pad;
|
||||
S32 max_client_height = gViewerWindow->getWindowHeight() - vert_pad;
|
||||
|
||||
if (mAspectRatio > 0.f)
|
||||
client_height = llceil((F32)client_width / mAspectRatio);
|
||||
if (mAspectRatio > 0.f) client_height = llceil((F32)client_width / mAspectRatio);
|
||||
|
||||
while ((client_width > max_client_width) ||
|
||||
(client_height > max_client_height ) )
|
||||
(client_height > max_client_height ))
|
||||
{
|
||||
client_width /= 2;
|
||||
client_height /= 2;
|
||||
@@ -603,6 +620,13 @@ bool LLPreviewTexture::setAspectRatio(const F32 width, const F32 height)
|
||||
return (ratio == mAspectRatio);
|
||||
}
|
||||
|
||||
void LLPreviewTexture::onClickProfile(void* userdata)
|
||||
{
|
||||
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
||||
LLUUID key = self->mCreatorKey;
|
||||
if (!key.isNull()) LLFloaterAvatarInfo::showFromDirectory(key);
|
||||
}
|
||||
|
||||
void LLPreviewTexture::onAspectRatioCommit(LLUICtrl* ctrl, void* userdata)
|
||||
{
|
||||
LLPreviewTexture* self = (LLPreviewTexture*) userdata;
|
||||
@@ -630,6 +654,7 @@ void LLPreviewTexture::loadAsset()
|
||||
{
|
||||
mImage = gImageList.getImage(mImageID, MIPMAP_TRUE, FALSE);
|
||||
mImage->setBoostLevel(LLViewerImageBoostLevel::BOOST_PREVIEW);
|
||||
mImage->forceToSaveRawImage(0) ;
|
||||
mAssetStatus = PREVIEW_ASSET_LOADING;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "llframetimer.h"
|
||||
#include "llviewerimage.h"
|
||||
|
||||
class LLComboBox;
|
||||
class LLImageRaw;
|
||||
|
||||
class LLPreviewTexture : public LLPreview
|
||||
@@ -55,7 +56,8 @@ public:
|
||||
const LLRect& rect,
|
||||
const std::string& title,
|
||||
const LLUUID& asset_id,
|
||||
BOOL copy_to_inv = FALSE);
|
||||
BOOL copy_to_inv = FALSE,
|
||||
BOOL copyable = TRUE);
|
||||
~LLPreviewTexture();
|
||||
|
||||
virtual void draw();
|
||||
@@ -77,7 +79,8 @@ public:
|
||||
S32 discard_level,
|
||||
BOOL final,
|
||||
void* userdata );
|
||||
|
||||
static LLPreviewTexture* getInstance(){ return sInstance; }
|
||||
LLUUID mCreatorKey;
|
||||
|
||||
protected:
|
||||
void init();
|
||||
@@ -96,13 +99,17 @@ private:
|
||||
BOOL mShowKeepDiscard;
|
||||
BOOL mCopyToInv;
|
||||
|
||||
static LLPreviewTexture* sInstance;
|
||||
static void onClickProfile(void* userdata);
|
||||
static void callbackLoadAvatarName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data);
|
||||
|
||||
// This is stored off in a member variable, because the save-as
|
||||
// button and drag and drop functionality need to know.
|
||||
BOOL mIsCopyable;
|
||||
|
||||
S32 mLastHeight;
|
||||
S32 mLastWidth;
|
||||
F32 mAspectRatio;
|
||||
F32 mAspectRatio; // 0 = Unconstrained
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -756,10 +756,11 @@ void init_menus()
|
||||
menu->append(new LLMenuItemCallGL( "Toggle IM Typing Notification", &handle_hide_typing_notification, NULL));
|
||||
menu->append(new LLMenuItemCallGL( "Close All Dialogs",
|
||||
&handle_close_all_notifications, NULL, NULL, 'D', MASK_CONTROL | MASK_ALT | MASK_SHIFT));
|
||||
|
||||
if (gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||
{
|
||||
menu->append(new LLMenuItemCallGL( "Message Log", &handle_open_message_log, NULL));
|
||||
menu->append(new LLMenuItemCallGL( "Message Builder", &handle_open_message_builder, NULL));
|
||||
|
||||
}
|
||||
menu->append(new LLMenuItemCallGL( "Sound Explorer",
|
||||
&handle_sounds_explorer, NULL));
|
||||
menu->append(new LLMenuItemCallGL( "Asset Blacklist",
|
||||
@@ -2437,7 +2438,7 @@ class LLCanIHasKillEmAll : public view_listener_t
|
||||
bool new_value = false;
|
||||
if(objpos)
|
||||
{
|
||||
if (!objpos->permYouOwner())
|
||||
if (!objpos->permYouOwner()||!gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||
new_value = false; // Don't give guns to retarded children.
|
||||
else new_value = true;
|
||||
}
|
||||
@@ -2455,9 +2456,10 @@ class LLOHGOD : public view_listener_t
|
||||
bool new_value = false;
|
||||
if(objpos)
|
||||
{
|
||||
if (!objpos->permYouOwner())
|
||||
if (!objpos->permYouOwner()||!gSavedSettings.getBOOL("AscentPowerfulWizard"))
|
||||
new_value = false; // Don't give guns to retarded children.
|
||||
else new_value = true;
|
||||
else
|
||||
new_value = true;
|
||||
}
|
||||
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value);
|
||||
@@ -2494,6 +2496,7 @@ class LLPowerfulWizard : public view_listener_t
|
||||
LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE
|
||||
LLSelectMgr::getInstance()->selectionUpdatePhysics(1);
|
||||
LLSelectMgr::getInstance()->sendDelink();
|
||||
LLSelectMgr::getInstance()->deselectAll();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
max_length="254" name="description_form" right="-10" />
|
||||
<pad height="0" />
|
||||
<spinner decimal_digits="0" follows="left|top" height="18" increment="1" initial_val="0"
|
||||
label="Priority" label_width="50" left="10" max_val="7" min_val="0"
|
||||
label="Priority" label_width="50" left="10" max_val="5" min_val="0"
|
||||
name="priority"
|
||||
tool_tip="Controls which other animations can be overridden by this animation."
|
||||
width="90" />
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="17" left="93"
|
||||
max_length="127" mouse_opaque="true" name="desc" select_all_on_focus_received="false" select_on_focus="false"
|
||||
width="229" />
|
||||
<!--<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" h_pad="0"
|
||||
halign="left" height="16" left="13" mouse_opaque="true" name="uuid txt" v_pad="0" width="80">
|
||||
UUID:
|
||||
@@ -37,7 +37,7 @@
|
||||
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" enabled="false"
|
||||
follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="false" height="16" left="93"
|
||||
right="-80" max_length="127" mouse_opaque="true" name="uploadtime" select_all_on_focus_received="false"
|
||||
select_on_focus="false" width="420" />-->
|
||||
select_on_focus="false" width="420" />
|
||||
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
label="Keep" label_selected="Keep" left="9" mouse_opaque="true" name="Keep" scale_image="true" width="100" />
|
||||
<button bottom="8" enabled="true" follows="left|bottom" font="SansSerif" halign="center" height="20"
|
||||
|
||||
@@ -300,9 +300,9 @@
|
||||
mouse_opaque="true" name="slider force" width="80" />
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-151" left="118" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="right" height="16"
|
||||
mouse_opaque="true" name="obj_count" v_pad="0" width="143">
|
||||
Selected objects: [COUNT]
|
||||
font="SansSerifSmall" h_pad="0" halign="right" height="16" visible="false"
|
||||
mouse_opaque="true" name="link_num_obj_count" v_pad="0" width="143">
|
||||
[DESC] [NUM]
|
||||
</text>
|
||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-163" left="118" drop_shadow_visible="true" follows="left|top"
|
||||
|
||||
@@ -1,23 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
|
||||
width="650" height="340" min_width="650" min_height="340" max_width="650"
|
||||
width="650" height="340" min_width="600" min_height="340" max_width="600"
|
||||
name="browser" title="Upload Browser" control_name="UploadBrowserFloater">
|
||||
<tab_container bottom="0" follows="left|right|top|bottom" height="320" left="4"
|
||||
name="FilesAndFolders" tab_position="top" tab_width="80" width="600">
|
||||
<panel bottom="0" label="Files" left="0" name="file_panel" width="370">
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
|
||||
mouse_opaque="true" name="filter_label" v_pad="0" width="128">
|
||||
Filter:
|
||||
</text>
|
||||
<combo_box allow_text_entry="false" bottom_delta="-5" follows="top|left" height="18" left_delta="40" max_chars="20"
|
||||
mouse_opaque="true" enabled="true" width="108" name="file_filter_combo" tool_tip="Preview at a fixed aspect ratio">
|
||||
<combo_item name="None" value="None">
|
||||
None
|
||||
</combo_item>
|
||||
<combo_item name="Animation" value="Animation" tool_tip="BVH">
|
||||
Animation
|
||||
</combo_item>
|
||||
<combo_item name="Sound" value="Sound" tool_tip="WAV">
|
||||
Sound
|
||||
</combo_item>
|
||||
<combo_item name="Texture" value="Texture" tool_tip="BMP, JPG, PNG, TGA">
|
||||
Texture
|
||||
</combo_item>
|
||||
</combo_box>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="right" height="12" left="155"
|
||||
mouse_opaque="true" name="result_label" v_pad="0" width="128">
|
||||
Files: [COUNT]
|
||||
</text>
|
||||
<scroll_list bottom="10" can_resize="true" column_padding="0" draw_heading="true"
|
||||
follows="left|top|bottom" left="5" multi_select="true"
|
||||
name="file_list" width="340" search_column="1"
|
||||
tool_tip="Hold shift or control while clicking to select multiple friends"
|
||||
top="-10">
|
||||
name="file_list" width="280" search_column="1"
|
||||
tool_tip="Hold shift or control while clicking to select multiple files"
|
||||
top="-46">
|
||||
<column name="file_type" width="0" />
|
||||
<column image="ff_edit_mine_button.tga" name="icon_inventory_type"
|
||||
tool_tip="Inventory Type" width="20" />
|
||||
<column dynamicwidth="true" label="Filename" name="file_name" tool_tip="Filename" />
|
||||
</scroll_list>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-23" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="352"
|
||||
bottom="-35" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||
Name:
|
||||
</text>
|
||||
@@ -25,29 +49,20 @@
|
||||
width="214" name="asset_name" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||
<text type="string" length="50" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="352"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="302"
|
||||
mouse_opaque="true" name="name_label" v_pad="0" width="128">
|
||||
Description:
|
||||
</text>
|
||||
<line_editor bottom_delta="-4" follows="left|top" font="SansSerifSmall" height="18" max_length="255"
|
||||
width="214" name="asset_desc" left_delta="70" select_all_on_focus_received="true" select_on_focus="true"/>
|
||||
<slider bottom_delta="0" can_edit_text="false" enabled="false" width="185" height="16" mouse_opaque="true"
|
||||
decimal_digits="0" increment="1" initial_val="16" left="30" min_val="1.0" max_val="16.0"
|
||||
decimal_digits="0" increment="1" initial_val="16" left="30" min_val="1.0" max_val="16.0" visible="false"
|
||||
name="timeline" show_text="false" value="1" control_name="AnimationTimelineScrubber"/>
|
||||
<button bottom="9" follows="bottom|left" height="22" label="Upload (L$10)"
|
||||
left="375" name="upload_button" tool_tip="Standard upload (L$10)"
|
||||
left="325" name="upload_button" tool_tip="Standard upload (L$10)"
|
||||
width="120" />
|
||||
<button bottom_delta="0" follows="bottom|left" height="22" label="Temp Upload"
|
||||
left_delta="125" name="upload_button" tool_tip="Uploads a temporary version of the texture. It's free, but has a limited lifespan and area it can be used."
|
||||
width="120" />
|
||||
</panel>
|
||||
<panel bottom="0" label="Folders" left="0" name="folder_panel" width="370">
|
||||
<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom_delta="-30" drop_shadow_visible="true" enabled="true" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="12" left="5"
|
||||
mouse_opaque="true" name="amountofawesomelabel" v_pad="0" width="170">
|
||||
Oh god this needs to be finished
|
||||
</text>
|
||||
</panel>
|
||||
</tab_container>
|
||||
</floater>
|
||||
|
||||
@@ -71,12 +71,18 @@
|
||||
tool_tip="Allows the camera to get reeeaaally close to things."
|
||||
mouse_opaque="true" name="disable_camera_zoom_check" radio_style="false"
|
||||
width="400" />
|
||||
<!--<check_box bottom_delta="-20" control_name="AscentPowerfulWizard" enabled="true"
|
||||
<check_box bottom_delta="-20" control_name="AscentPowerfulWizardCheck1" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||
label="Enable Power User functionality" left="10"
|
||||
tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself. Turn this on at your own risk, and use any features it enables responsibly. Ascent devs will not replace anything you break if you ruin something important."
|
||||
mouse_opaque="true" name="always_fly_check" radio_style="false"
|
||||
width="400" />-->
|
||||
tool_tip="Adds features deemed too dangerous for normal use. These features can wreak havoc or do bad things if misused - Mostly to yourself or your belongings. If you're sure, activate the checkbox below as well."
|
||||
mouse_opaque="true" name="power_user_check" radio_style="false"
|
||||
width="400" />
|
||||
<check_box bottom_delta="-20" control_name="AscentPowerfulWizardCheck1" enabled="true"
|
||||
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
|
||||
label="Confirm Power User functionality" left="10"
|
||||
tool_tip="Confirms Power User activation. Turn this on at your own risk, and use any features it enables responsibly. Ascent devs will not replace anything you break if you ruin something important. Unlike most checkboxes, you must apply/ok changes before this will activate."
|
||||
mouse_opaque="true" name="power_user_confirm_check" radio_style="false"
|
||||
width="400" />
|
||||
</panel>
|
||||
<panel border="true" left="1" bottom="-408" height="408" width="500" mouse_opaque="true"
|
||||
follows="left|top|right|bottom" label="Chat/IM" name="Chat/IM">
|
||||
|
||||
Reference in New Issue
Block a user