diff options
Diffstat (limited to 'linden/indra/newview/llprogressview.cpp')
-rw-r--r-- | linden/indra/newview/llprogressview.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/linden/indra/newview/llprogressview.cpp b/linden/indra/newview/llprogressview.cpp index c319e59..10b3115 100644 --- a/linden/indra/newview/llprogressview.cpp +++ b/linden/indra/newview/llprogressview.cpp | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "indra_constants.h" | 36 | #include "indra_constants.h" |
37 | #include "llmath.h" | 37 | #include "llmath.h" |
38 | #include "llgl.h" | 38 | #include "llgl.h" |
39 | #include "llglimmediate.h" | ||
39 | #include "llui.h" | 40 | #include "llui.h" |
40 | #include "llfontgl.h" | 41 | #include "llfontgl.h" |
41 | #include "llimagegl.h" | 42 | #include "llimagegl.h" |
@@ -74,7 +75,7 @@ LLProgressView::LLProgressView(const std::string& name, const LLRect &rect) | |||
74 | const S32 CANCEL_BTN_OFFSET = 16; | 75 | const S32 CANCEL_BTN_OFFSET = 16; |
75 | LLRect r; | 76 | LLRect r; |
76 | r.setOriginAndSize( | 77 | r.setOriginAndSize( |
77 | mRect.getWidth() - CANCEL_BTN_OFFSET - CANCEL_BTN_WIDTH, CANCEL_BTN_OFFSET, | 78 | getRect().getWidth() - CANCEL_BTN_OFFSET - CANCEL_BTN_WIDTH, CANCEL_BTN_OFFSET, |
78 | CANCEL_BTN_WIDTH, BTN_HEIGHT ); | 79 | CANCEL_BTN_WIDTH, BTN_HEIGHT ); |
79 | 80 | ||
80 | mCancelBtn = new LLButton( | 81 | mCancelBtn = new LLButton( |
@@ -162,7 +163,7 @@ void LLProgressView::draw() | |||
162 | // Make sure the progress view always fills the entire window. | 163 | // Make sure the progress view always fills the entire window. |
163 | S32 width = gViewerWindow->getWindowWidth(); | 164 | S32 width = gViewerWindow->getWindowWidth(); |
164 | S32 height = gViewerWindow->getWindowHeight(); | 165 | S32 height = gViewerWindow->getWindowHeight(); |
165 | if( (width != mRect.getWidth()) || (height != mRect.getHeight()) ) | 166 | if( (width != getRect().getWidth()) || (height != getRect().getHeight()) ) |
166 | { | 167 | { |
167 | reshape( width, height ); | 168 | reshape( width, height ); |
168 | } | 169 | } |
@@ -175,7 +176,7 @@ void LLProgressView::draw() | |||
175 | { | 176 | { |
176 | LLGLSUIDefault gls_ui; | 177 | LLGLSUIDefault gls_ui; |
177 | LLViewerImage::bindTexture(gStartImageGL); | 178 | LLViewerImage::bindTexture(gStartImageGL); |
178 | glColor4f(1.f, 1.f, 1.f, mFadeTimer.getStarted() ? clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, FADE_IN_TIME, 1.f, 0.f) : 1.f); | 179 | gGL.color4f(1.f, 1.f, 1.f, mFadeTimer.getStarted() ? clamp_rescale(mFadeTimer.getElapsedTimeF32(), 0.f, FADE_IN_TIME, 1.f, 0.f) : 1.f); |
179 | F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight; | 180 | F32 image_aspect = (F32)gStartImageWidth / (F32)gStartImageHeight; |
180 | F32 view_aspect = (F32)width / (F32)height; | 181 | F32 view_aspect = (F32)width / (F32)height; |
181 | // stretch image to maintain aspect ratio | 182 | // stretch image to maintain aspect ratio |
@@ -189,14 +190,14 @@ void LLProgressView::draw() | |||
189 | glTranslatef(0.f, -0.5f * (view_aspect / image_aspect - 1.f) * height, 0.f); | 190 | glTranslatef(0.f, -0.5f * (view_aspect / image_aspect - 1.f) * height, 0.f); |
190 | glScalef(1.f, view_aspect / image_aspect, 1.f); | 191 | glScalef(1.f, view_aspect / image_aspect, 1.f); |
191 | } | 192 | } |
192 | gl_rect_2d_simple_tex( mRect.getWidth(), mRect.getHeight() ); | 193 | gl_rect_2d_simple_tex( getRect().getWidth(), getRect().getHeight() ); |
193 | gStartImageGL->unbindTexture(0, GL_TEXTURE_2D); | 194 | gStartImageGL->unbindTexture(0, GL_TEXTURE_2D); |
194 | } | 195 | } |
195 | else | 196 | else |
196 | { | 197 | { |
197 | LLGLSNoTexture gls_no_texture; | 198 | LLGLSNoTexture gls_no_texture; |
198 | glColor4f(0.f, 0.f, 0.f, 1.f); | 199 | gGL.color4f(0.f, 0.f, 0.f, 1.f); |
199 | gl_rect_2d(mRect); | 200 | gl_rect_2d(getRect()); |
200 | } | 201 | } |
201 | glPopMatrix(); | 202 | glPopMatrix(); |
202 | } | 203 | } |
@@ -213,8 +214,8 @@ void LLProgressView::draw() | |||
213 | return; | 214 | return; |
214 | } | 215 | } |
215 | 216 | ||
216 | S32 line_x = mRect.getWidth() / 2; | 217 | S32 line_x = getRect().getWidth() / 2; |
217 | S32 line_one_y = mRect.getHeight() / 2 + 64; | 218 | S32 line_one_y = getRect().getHeight() / 2 + 64; |
218 | const S32 LINE_SPACING = 25; | 219 | const S32 LINE_SPACING = 25; |
219 | S32 line_two_y = line_one_y - LINE_SPACING; | 220 | S32 line_two_y = line_one_y - LINE_SPACING; |
220 | const LLFontGL* font = LLFontGL::sSansSerif; | 221 | const LLFontGL* font = LLFontGL::sSansSerif; |
@@ -243,8 +244,8 @@ void LLProgressView::draw() | |||
243 | 244 | ||
244 | S32 bar_bottom = line_two_y - 30; | 245 | S32 bar_bottom = line_two_y - 30; |
245 | S32 bar_height = 18; | 246 | S32 bar_height = 18; |
246 | S32 bar_width = mRect.getWidth() * 2 / 3; | 247 | S32 bar_width = getRect().getWidth() * 2 / 3; |
247 | S32 bar_left = (mRect.getWidth() / 2) - (bar_width / 2); | 248 | S32 bar_left = (getRect().getWidth() / 2) - (bar_width / 2); |
248 | 249 | ||
249 | gl_draw_scaled_image_with_border( | 250 | gl_draw_scaled_image_with_border( |
250 | bar_left + 2, | 251 | bar_left + 2, |