diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llnetmap.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 31 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 21 | ||||
-rw-r--r-- | indra/newview/pipeline.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_test_widgets.xml | 10 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_login.xml | 8 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml | 5 |
8 files changed, 61 insertions, 21 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 4286582cdc..6145588df2 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -155,11 +155,9 @@ void LLNetMap::draw() F32 rotation = 0; { - LLGLEnable scissor(GL_SCISSOR_TEST); - + LLLocalClipRect clip(getLocalRect()); { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - LLLocalClipRect clip(getLocalRect()); glMatrixMode(GL_MODELVIEW); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index e8f310c27e..70dc04f575 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -101,6 +101,7 @@ LLSideTray* LLSideTray::getInstance() if (!sInstance) { sInstance = LLUICtrlFactory::createFromFile<LLSideTray>("panel_side_tray.xml",NULL, LLRootView::child_registry_t::instance()); + sInstance->setXMLFilename("panel_side_tray.xml"); } return sInstance; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d69cc5999c..1054223dcf 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2302,13 +2302,13 @@ void LLViewerWindow::moveCursorToCenter() // Hover handlers // -void append_xui_tooltip(LLView* viewp, std::string& tool_tip_msg) +void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params) { if (viewp) { - if (!tool_tip_msg.empty()) + if (!params.styled_message().empty()) { - tool_tip_msg.append("\n---------\n"); + params.styled_message.add().text("\n---------\n"); } LLView::root_to_view_iterator_t end_tooltip_it = viewp->endRootToView(); // NOTE: we skip "root" since it is assumed @@ -2318,15 +2318,16 @@ void append_xui_tooltip(LLView* viewp, std::string& tool_tip_msg) { LLView* viewp = *tooltip_it; - tool_tip_msg.append(viewp->getName()); + params.styled_message.add().text(viewp->getName()); + LLPanel* panelp = dynamic_cast<LLPanel*>(viewp); if (panelp && !panelp->getXMLFilename().empty()) { - tool_tip_msg.append("("); - tool_tip_msg.append(panelp->getXMLFilename()); - tool_tip_msg.append(")"); + params.styled_message.add() + .text("(" + panelp->getXMLFilename() + ")") + .style.color(LLColor4(0.7f, 0.7f, 1.f, 1.f)); } - tool_tip_msg.append("/"); + params.styled_message.add().text("/"); } } } @@ -2567,6 +2568,8 @@ void LLViewerWindow::updateUI() if (gSavedSettings.getBOOL("DebugShowXUINames")) { + LLToolTip::Params params; + LLView* tooltip_view = mRootView; LLView::tree_iterator_t end_it = mRootView->endTreeDFS(); for (LLView::tree_iterator_t it = mRootView->beginTreeDFS(); it != end_it; ++it) @@ -2599,20 +2602,20 @@ void LLViewerWindow::updateUI() // NOTE: this emulates visiting only the leaf nodes that meet our criteria if (!viewp->hasAncestor(tooltip_view)) { - append_xui_tooltip(tooltip_view, tool_tip_msg); + append_xui_tooltip(tooltip_view, params); screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); } tooltip_view = viewp; } } - append_xui_tooltip(tooltip_view, tool_tip_msg); + append_xui_tooltip(tooltip_view, params); screen_sticky_rect.intersectWith(tooltip_view->calcScreenRect()); - LLToolTipMgr::instance().show(LLToolTip::Params() - .message(tool_tip_msg) - .sticky_rect(screen_sticky_rect) - .max_width(400)); + params.sticky_rect = screen_sticky_rect; + params.max_width = 400; + + LLToolTipMgr::instance().show(params); } // if there is a mouse captor, nothing else gets a tooltip else if (mouse_captor) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1129e9ffd1..73a91bbbc0 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -514,14 +514,16 @@ void LLPipeline::resizeScreenTexture() { GLuint resX = gViewerWindow->getWorldViewWidthRaw(); GLuint resY = gViewerWindow->getWorldViewHeightRaw(); + GLuint view_width = gViewerWindow->getWorldViewWidth(); + GLuint view_height = gViewerWindow->getWorldViewHeight(); - allocateScreenBuffer(resX,resY); + allocateScreenBuffer(resX, resY, view_width, view_height); llinfos << "RESIZED SCREEN TEXTURE: " << resX << "x" << resY << llendl; } } -void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) +void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height) { U32 samples = gSavedSettings.getU32("RenderFSAASamples"); @@ -542,18 +544,24 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) //allocate deferred rendering color buffers mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + mDeferredScreen.setViewport(viewport_width, viewport_height); + mDeferredDepth.setViewport(viewport_width, viewport_height); addDeferredAttachments(mDeferredScreen); mScreen.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); mEdgeMap.allocate(resX, resY, GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + mScreen.setViewport(viewport_width, viewport_height); + mEdgeMap.setViewport(viewport_width, viewport_height); for (U32 i = 0; i < 3; i++) { mDeferredLight[i].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); + mDeferredLight[i].setViewport(viewport_width, viewport_height); } for (U32 i = 0; i < 2; i++) { mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE); + mGIMapPost[i].setViewport(viewport_width, viewport_height); } F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale"); @@ -561,6 +569,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) for (U32 i = 0; i < 4; i++) { mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE); + mShadow[i].setViewport(viewport_width, viewport_height); } @@ -570,6 +579,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) for (U32 i = 4; i < 6; i++) { mShadow[i].allocate(width, height, 0, TRUE, FALSE); + mShadow[i].setViewport(viewport_width, viewport_height); } @@ -577,16 +587,19 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) width = nhpo2(resX)/2; height = nhpo2(resY)/2; mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE); + mLuminanceMap.setViewport(viewport_width, viewport_height); } else { mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); + mScreen.setViewport(viewport_width, viewport_height); } if (gGLManager.mHasFramebufferMultisample && samples > 1) { mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); + mSampleBuffer.setViewport(viewport_width, viewport_height); mScreen.setSampleBuffer(&mSampleBuffer); if (LLPipeline::sRenderDeferred) @@ -700,6 +713,8 @@ void LLPipeline::createGLBuffers() GLuint resX = gViewerWindow->getWorldViewWidthRaw(); GLuint resY = gViewerWindow->getWorldViewHeightRaw(); + GLuint viewport_width = gViewerWindow->getWorldViewWidth(); + GLuint viewport_height = gViewerWindow->getWorldViewHeight(); if (LLPipeline::sRenderGlow) { //screen space glow buffers @@ -711,7 +726,7 @@ void LLPipeline::createGLBuffers() mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE); } - allocateScreenBuffer(resX,resY); + allocateScreenBuffer(resX,resY, viewport_width, viewport_height); } if (sRenderDeferred) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index ce50a37405..9193e19bb1 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -111,7 +111,7 @@ public: void resizeScreenTexture(); void releaseGLBuffers(); void createGLBuffers(); - void allocateScreenBuffer(U32 resX, U32 resY); + void allocateScreenBuffer(U32 resX, U32 resY, U32 viewport_width, U32 viewport_height); void resetVertexBuffers(LLDrawable* drawable); void setUseVBO(BOOL use_vbo); diff --git a/indra/newview/skins/default/xui/en/floater_test_widgets.xml b/indra/newview/skins/default/xui/en/floater_test_widgets.xml index 44dcb07526..a2055d8c52 100644 --- a/indra/newview/skins/default/xui/en/floater_test_widgets.xml +++ b/indra/newview/skins/default/xui/en/floater_test_widgets.xml @@ -385,6 +385,16 @@ line to actually fit left="10" width="250" follows="top|left" + font.name="Monospace" + name="test_text10" + tool_tip="text"> + Monospace Button Flyout Checkbox + </text> + <text + top_pad="10" + left="10" + width="250" + follows="top|left" font.name="SansSerifSmall" name="test_text10" tool_tip="text"> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 5eb0560962..bd60574a95 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -185,6 +185,14 @@ <menu_item_call.on_click function="Advanced.ShowSideTray" /> </menu_item_call> + <menu_item_call + label="Widget Test" + name="Widget Test" + shortcut="control|shift|T"> + <menu_item_call.on_click + function="ShowFloater" + parameter="test_widgets" /> + </menu_item_call> <menu_item_check label="Reg In Client Test (restart)" name="Reg In Client Test (restart)"> diff --git a/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml b/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml new file mode 100644 index 0000000000..2f72ad65a1 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/ui_ctrl.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Global settings for all widgets ("UI Controls") --> +<ui_ctrl + font="SansSerif" + /> |