diff options
author | unknown | 2008-12-18 00:58:06 -0700 |
---|---|---|
committer | unknown | 2008-12-18 00:58:06 -0700 |
commit | 2dd736abcecf4070e1a3ff21b184721efcc33f4d (patch) | |
tree | 327ceedde9e58b2f4af63c33132bf45ded522097 /linden/indra/newview/llfloatersnapshot.cpp | |
parent | 1.1 wip copy (diff) | |
download | meta-impy-2dd736abcecf4070e1a3ff21b184721efcc33f4d.zip meta-impy-2dd736abcecf4070e1a3ff21b184721efcc33f4d.tar.gz meta-impy-2dd736abcecf4070e1a3ff21b184721efcc33f4d.tar.bz2 meta-impy-2dd736abcecf4070e1a3ff21b184721efcc33f4d.tar.xz |
Moved common options out of Advanced
Diffstat (limited to 'linden/indra/newview/llfloatersnapshot.cpp')
-rw-r--r-- | linden/indra/newview/llfloatersnapshot.cpp | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index 954bf9f..6e66103 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp | |||
@@ -992,6 +992,7 @@ public: | |||
992 | static void onClickLess(void* data) ; | 992 | static void onClickLess(void* data) ; |
993 | static void onClickMore(void* data) ; | 993 | static void onClickMore(void* data) ; |
994 | static void onClickUICheck(LLUICtrl *ctrl, void* data); | 994 | static void onClickUICheck(LLUICtrl *ctrl, void* data); |
995 | static void onClickHighResCheck(LLUICtrl *ctrl, void* data); | ||
995 | static void onClickHUDCheck(LLUICtrl *ctrl, void* data); | 996 | static void onClickHUDCheck(LLUICtrl *ctrl, void* data); |
996 | static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data); | 997 | static void onClickKeepOpenCheck(LLUICtrl *ctrl, void* data); |
997 | static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data); | 998 | static void onClickKeepAspectCheck(LLUICtrl *ctrl, void* data); |
@@ -1105,6 +1106,10 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) | |||
1105 | { | 1106 | { |
1106 | LLSnapshotLivePreview* previewp = getPreviewView(floaterp); | 1107 | LLSnapshotLivePreview* previewp = getPreviewView(floaterp); |
1107 | 1108 | ||
1109 | LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floaterp); | ||
1110 | if (shot_type != LLSnapshotLivePreview::SNAPSHOT_LOCAL) | ||
1111 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); | ||
1112 | |||
1108 | S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; | 1113 | S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; |
1109 | 1114 | ||
1110 | LLComboBox* combo; | 1115 | LLComboBox* combo; |
@@ -1234,6 +1239,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) | |||
1234 | floater->childSetVisible("snapshot_height", is_advance); | 1239 | floater->childSetVisible("snapshot_height", is_advance); |
1235 | floater->childSetVisible("keep_aspect_check", is_advance); | 1240 | floater->childSetVisible("keep_aspect_check", is_advance); |
1236 | floater->childSetVisible("ui_check", is_advance); | 1241 | floater->childSetVisible("ui_check", is_advance); |
1242 | floater->childSetVisible("high_res_check", is_advance && is_local); | ||
1237 | floater->childSetVisible("hud_check", is_advance); | 1243 | floater->childSetVisible("hud_check", is_advance); |
1238 | floater->childSetVisible("keep_open_check", is_advance); | 1244 | floater->childSetVisible("keep_open_check", is_advance); |
1239 | floater->childSetVisible("freeze_frame_check", is_advance); | 1245 | floater->childSetVisible("freeze_frame_check", is_advance); |
@@ -1246,7 +1252,7 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) | |||
1246 | layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; | 1252 | layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; |
1247 | floater->childSetValue("layer_types", "colors"); | 1253 | floater->childSetValue("layer_types", "colors"); |
1248 | if(is_advance) | 1254 | if(is_advance) |
1249 | { | 1255 | { |
1250 | setResolution(floater, "postcard_size_combo"); | 1256 | setResolution(floater, "postcard_size_combo"); |
1251 | } | 1257 | } |
1252 | break; | 1258 | break; |
@@ -1434,7 +1440,26 @@ void LLFloaterSnapshot::Impl::onClickUICheck(LLUICtrl *ctrl, void* data) | |||
1434 | 1440 | ||
1435 | LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; | 1441 | LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; |
1436 | if (view) | 1442 | if (view) |
1443 | { | ||
1444 | BOOL high_res_snapshot = gSavedSettings.getBOOL("HighResSnapshot"); | ||
1445 | if (high_res_snapshot) gSavedSettings.setBOOL("HighResSnapshot", FALSE); | ||
1446 | view->childSetEnabled("high_res_check", !check->get()); | ||
1447 | checkAutoSnapshot(getPreviewView(view), TRUE); | ||
1448 | } | ||
1449 | } | ||
1450 | |||
1451 | // static | ||
1452 | void LLFloaterSnapshot::Impl::onClickHighResCheck(LLUICtrl *ctrl, void* data) | ||
1453 | { | ||
1454 | LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; | ||
1455 | gSavedSettings.setBOOL( "HighResSnapshot", check->get() ); | ||
1456 | |||
1457 | LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; | ||
1458 | if (view) | ||
1437 | { | 1459 | { |
1460 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); | ||
1461 | if (ui_in_snapshot) gSavedSettings.setBOOL("RenderUIInSnapshot", FALSE); | ||
1462 | view->childSetEnabled("ui_check", !check->get()); | ||
1438 | checkAutoSnapshot(getPreviewView(view), TRUE); | 1463 | checkAutoSnapshot(getPreviewView(view), TRUE); |
1439 | } | 1464 | } |
1440 | } | 1465 | } |
@@ -1912,6 +1937,9 @@ BOOL LLFloaterSnapshot::postBuild() | |||
1912 | 1937 | ||
1913 | childSetCommitCallback("ui_check", Impl::onClickUICheck, this); | 1938 | childSetCommitCallback("ui_check", Impl::onClickUICheck, this); |
1914 | 1939 | ||
1940 | childSetCommitCallback("high_res_check", Impl::onClickHighResCheck, this); | ||
1941 | childSetValue("high_res_check", gSavedSettings.getBOOL("HighResSnapshot")); | ||
1942 | |||
1915 | childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this); | 1943 | childSetCommitCallback("hud_check", Impl::onClickHUDCheck, this); |
1916 | childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot")); | 1944 | childSetValue("hud_check", gSavedSettings.getBOOL("RenderHUDInSnapshot")); |
1917 | 1945 | ||
@@ -2001,8 +2029,23 @@ void LLFloaterSnapshot::draw() | |||
2001 | childSetEnabled("send_btn", FALSE); | 2029 | childSetEnabled("send_btn", FALSE); |
2002 | childSetEnabled("save_btn", FALSE); | 2030 | childSetEnabled("save_btn", FALSE); |
2003 | } | 2031 | } |
2004 | 2032 | ||
2005 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); | 2033 | BOOL ui_in_snapshot = gSavedSettings.getBOOL("RenderUIInSnapshot"); |
2034 | |||
2035 | if (previewp->getSnapshotType() != LLSnapshotLivePreview::SNAPSHOT_LOCAL) | ||
2036 | { | ||
2037 | childSetValue("high_res_check", FALSE); | ||
2038 | childSetEnabled("ui_check", TRUE); | ||
2039 | } | ||
2040 | else | ||
2041 | { | ||
2042 | if (ui_in_snapshot) | ||
2043 | { | ||
2044 | gSavedSettings.setBOOL("HighResSnapshot", FALSE); | ||
2045 | childSetEnabled("high_res_check", FALSE); | ||
2046 | } | ||
2047 | } | ||
2048 | |||
2006 | childSetValue("ui_check", ui_in_snapshot); | 2049 | childSetValue("ui_check", ui_in_snapshot); |
2007 | childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); | 2050 | childSetToolTip("ui_check", std::string("If selected shows the UI in the snapshot")); |
2008 | } | 2051 | } |