diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-11-16 10:18:42 +0100 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-11-16 10:39:23 +0100 |
commit | f98fa678205a4575ea2590994c863527c29c2ab9 (patch) | |
tree | bb75061b35c936b31a2c56bc49de35f2b8824b7d /indra | |
parent | 361efcb9267f2c91f88198081bbe6ac2264766fd (diff) |
SL-20563 Add 'No Post' option to Snapshot floater
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloatersnapshot.h | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_snapshot.xml | 12 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 2 |
4 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 6b9d4580dc..4806fe9625 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -461,8 +461,8 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data { LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; gSavedSettings.setBOOL( "AutoSnapshot", check->get() ); - - LLFloaterSnapshotBase *view = (LLFloaterSnapshotBase *)data; + + LLFloaterSnapshotBase *view = (LLFloaterSnapshotBase *)data; if (view) { view->impl->checkAutoSnapshot(view->getPreviewView()); @@ -471,6 +471,17 @@ void LLFloaterSnapshotBase::ImplBase::onClickAutoSnap(LLUICtrl *ctrl, void* data } // static +void LLFloaterSnapshotBase::ImplBase::onClickNoPost(LLUICtrl *ctrl, void* data) +{ + BOOL no_post = ((LLCheckBoxCtrl*)ctrl)->get(); + gSavedSettings.setBOOL("RenderDisablePostProcessing", no_post); + + LLFloaterSnapshotBase* view = (LLFloaterSnapshotBase*)data; + view->getPreviewView()->updateSnapshot(TRUE, TRUE); + view->impl->updateControls(view); +} + +// static void LLFloaterSnapshotBase::ImplBase::onClickFilter(LLUICtrl *ctrl, void* data) { LLFloaterSnapshotBase *view = (LLFloaterSnapshotBase *)data; @@ -997,6 +1008,9 @@ BOOL LLFloaterSnapshot::postBuild() getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", ImplBase::onClickAutoSnap, this); + getChild<LLUICtrl>("no_post_check")->setValue(gSavedSettings.getBOOL("RenderDisablePostProcessing")); + childSetCommitCallback("no_post_check", ImplBase::onClickNoPost, this); + getChild<LLButton>("retract_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); getChild<LLButton>("extend_btn")->setCommitCallback(boost::bind(&LLFloaterSnapshot::onExtendFloater, this)); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 7fc62a2746..89cb2bc809 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -100,6 +100,7 @@ public: static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); + static void onClickNoPost(LLUICtrl *ctrl, void* data); static void onClickFilter(LLUICtrl *ctrl, void* data); static void onClickUICheck(LLUICtrl *ctrl, void* data); static void onClickHUDCheck(LLUICtrl *ctrl, void* data); diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index fcd24d83bb..0866594625 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -115,7 +115,7 @@ top_delta="0" width="31" /> <panel - height="159" + height="179" layout="topleft" follows="top|left" left="0" @@ -193,6 +193,14 @@ top_pad="1" width="180" name="auto_snapshot_check" /> + <check_box + label="No post-processing" + layout="topleft" + height="16" + left="10" + top_pad="1" + width="180" + name="no_post_check" /> <text type="string" length="1" @@ -233,7 +241,7 @@ </panel> <panel_container follows="left|top" - height="230" + height="210" layout="topleft" left="0" name="panel_container" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 0bfdead6e7..2c4b03251a 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1545,7 +1545,7 @@ function="World.EnvPreset" <menu_item_separator/> <menu_item_check - label="No Post" + label="No Post-processing" name="No Post"> <menu_item_check.on_check control="RenderDisablePostProcessing" /> |