diff options
author | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:04 -0500 |
commit | 117e22047c5752352342d64e3fb7ce00a4eb8113 (patch) | |
tree | e32de2cfba0dda8705ae528fcd1fbe23ba075685 /linden/indra/llui/llui.cpp | |
parent | Second Life viewer sources 1.18.0.6 (diff) | |
download | meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.zip meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.gz meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.bz2 meta-impy-117e22047c5752352342d64e3fb7ce00a4eb8113.tar.xz |
Second Life viewer sources 1.18.1.2
Diffstat (limited to 'linden/indra/llui/llui.cpp')
-rw-r--r-- | linden/indra/llui/llui.cpp | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index a725281..d0815a7 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp | |||
@@ -77,6 +77,8 @@ LLVector2 LLUI::sGLScaleFactor(1.f, 1.f); | |||
77 | LLWindow* LLUI::sWindow = NULL; | 77 | LLWindow* LLUI::sWindow = NULL; |
78 | LLHtmlHelp* LLUI::sHtmlHelp = NULL; | 78 | LLHtmlHelp* LLUI::sHtmlHelp = NULL; |
79 | BOOL LLUI::sShowXUINames = FALSE; | 79 | BOOL LLUI::sShowXUINames = FALSE; |
80 | std::stack<LLRect> LLUI::sClipRectStack; | ||
81 | |||
80 | // | 82 | // |
81 | // Functions | 83 | // Functions |
82 | // | 84 | // |
@@ -110,7 +112,7 @@ void make_ui_sound(const LLString& name) | |||
110 | { | 112 | { |
111 | llinfos << "ui sound name: " << name << llendl; | 113 | llinfos << "ui sound name: " << name << llendl; |
112 | } | 114 | } |
113 | LLUI::sAudioCallback(uuid, LLUI::sConfigGroup->getF32("AudioLevelUI")); | 115 | LLUI::sAudioCallback(uuid); |
114 | } | 116 | } |
115 | } | 117 | } |
116 | } | 118 | } |
@@ -1811,3 +1813,59 @@ void LLUI::setHtmlHelp(LLHtmlHelp* html_help) | |||
1811 | { | 1813 | { |
1812 | LLUI::sHtmlHelp = html_help; | 1814 | LLUI::sHtmlHelp = html_help; |
1813 | } | 1815 | } |
1816 | |||
1817 | //static | ||
1818 | void LLUI::pushClipRect(const LLRect& rect) | ||
1819 | { | ||
1820 | LLRect combined_clip_rect = rect; | ||
1821 | if (!sClipRectStack.empty()) | ||
1822 | { | ||
1823 | combined_clip_rect.intersectWith(sClipRectStack.top()); | ||
1824 | } | ||
1825 | sClipRectStack.push(combined_clip_rect); | ||
1826 | setScissorRegionScreen(combined_clip_rect); | ||
1827 | } | ||
1828 | |||
1829 | //static | ||
1830 | void LLUI::popClipRect() | ||
1831 | { | ||
1832 | sClipRectStack.pop(); | ||
1833 | if (!sClipRectStack.empty()) | ||
1834 | { | ||
1835 | setScissorRegionScreen(sClipRectStack.top()); | ||
1836 | } | ||
1837 | } | ||
1838 | |||
1839 | LLClipRect::LLClipRect(const LLRect& rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST, enabled), mEnabled(enabled) | ||
1840 | { | ||
1841 | if (mEnabled) | ||
1842 | { | ||
1843 | LLUI::pushClipRect(rect); | ||
1844 | } | ||
1845 | } | ||
1846 | |||
1847 | LLClipRect::~LLClipRect() | ||
1848 | { | ||
1849 | if (mEnabled) | ||
1850 | { | ||
1851 | LLUI::popClipRect(); | ||
1852 | } | ||
1853 | } | ||
1854 | |||
1855 | LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled) : mScissorState(GL_SCISSOR_TEST, enabled), mEnabled(enabled) | ||
1856 | { | ||
1857 | if (mEnabled) | ||
1858 | { | ||
1859 | LLRect scissor_rect = rect; | ||
1860 | scissor_rect.translate(LLFontGL::sCurOrigin.mX, LLFontGL::sCurOrigin.mY); | ||
1861 | LLUI::pushClipRect(scissor_rect); | ||
1862 | } | ||
1863 | } | ||
1864 | |||
1865 | LLLocalClipRect::~LLLocalClipRect() | ||
1866 | { | ||
1867 | if (mEnabled) | ||
1868 | { | ||
1869 | LLUI::popClipRect(); | ||
1870 | } | ||
1871 | } | ||