diff options
Diffstat (limited to 'linden/indra/newview/llvelocitybar.cpp')
-rw-r--r-- | linden/indra/newview/llvelocitybar.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/linden/indra/newview/llvelocitybar.cpp b/linden/indra/newview/llvelocitybar.cpp index c5c4b5c..5073aea 100644 --- a/linden/indra/newview/llvelocitybar.cpp +++ b/linden/indra/newview/llvelocitybar.cpp | |||
@@ -81,8 +81,8 @@ void LLVelocityBar::draw() | |||
81 | LLGLSNoTexture gls_no_texture; | 81 | LLGLSNoTexture gls_no_texture; |
82 | 82 | ||
83 | // draw background box | 83 | // draw background box |
84 | // glColor4f(0.f, 0.f, 0.f, 0.3f); | 84 | // gGL.color4f(0.f, 0.f, 0.f, 0.3f); |
85 | // gl_rect_2d(0, mRect.getHeight(), mRect.getWidth(), 0); | 85 | // gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0); |
86 | 86 | ||
87 | // draw white lines for special times | 87 | // draw white lines for special times |
88 | // (60 hz = 16 ms, 30 hz = 33 ms, 15 hz = 66 ms) | 88 | // (60 hz = 16 ms, 30 hz = 33 ms, 15 hz = 66 ms) |
@@ -95,33 +95,32 @@ void LLVelocityBar::draw() | |||
95 | right = left + TICK_WIDTH; | 95 | right = left + TICK_WIDTH; |
96 | gl_rect_2d(left, top, right, bottom, color); | 96 | gl_rect_2d(left, top, right, bottom, color); |
97 | 97 | ||
98 | left = (S32) (mRect.getWidth() * 1 / 6); | 98 | left = (S32) (getRect().getWidth() * 1 / 6); |
99 | right = left + TICK_WIDTH; | 99 | right = left + TICK_WIDTH; |
100 | gl_rect_2d(left, top, right, bottom, color); | 100 | gl_rect_2d(left, top, right, bottom, color); |
101 | 101 | ||
102 | left = (S32) (mRect.getWidth() * 2 / 6); | 102 | left = (S32) (getRect().getWidth() * 2 / 6); |
103 | right = left + TICK_WIDTH; | 103 | right = left + TICK_WIDTH; |
104 | gl_rect_2d(left, top, right, bottom, color); | 104 | gl_rect_2d(left, top, right, bottom, color); |
105 | 105 | ||
106 | left = (S32) (mRect.getWidth() * 3 / 6); | 106 | left = (S32) (getRect().getWidth() * 3 / 6); |
107 | right = left + TICK_WIDTH; | 107 | right = left + TICK_WIDTH; |
108 | gl_rect_2d(left, top, right, bottom, color); | 108 | gl_rect_2d(left, top, right, bottom, color); |
109 | 109 | ||
110 | left = (S32) (mRect.getWidth() * 4 / 6); | 110 | left = (S32) (getRect().getWidth() * 4 / 6); |
111 | right = left + TICK_WIDTH; | 111 | right = left + TICK_WIDTH; |
112 | gl_rect_2d(left, top, right, bottom, color); | 112 | gl_rect_2d(left, top, right, bottom, color); |
113 | 113 | ||
114 | left = (S32) (mRect.getWidth() * 5 / 6); | 114 | left = (S32) (getRect().getWidth() * 5 / 6); |
115 | right = left + TICK_WIDTH; | 115 | right = left + TICK_WIDTH; |
116 | gl_rect_2d(left, top, right, bottom, color); | 116 | gl_rect_2d(left, top, right, bottom, color); |
117 | 117 | ||
118 | left = (S32) (mRect.getWidth() * 6 / 6); | 118 | left = (S32) (getRect().getWidth() * 6 / 6); |
119 | right = left + TICK_WIDTH; | 119 | right = left + TICK_WIDTH; |
120 | gl_rect_2d(left, top, right, bottom, color); | 120 | gl_rect_2d(left, top, right, bottom, color); |
121 | 121 | ||
122 | 122 | ||
123 | // draw labels for the bar | 123 | // draw labels for the bar |
124 | LLGLSTexture gls_texture; | ||
125 | 124 | ||
126 | top = BAR_TOP + 15; | 125 | top = BAR_TOP + 15; |
127 | left = 0; | 126 | left = 0; |
@@ -134,22 +133,22 @@ void LLVelocityBar::draw() | |||
134 | left = - MAGIC_CHAR_WIDTH/2; | 133 | left = - MAGIC_CHAR_WIDTH/2; |
135 | LLFontGL::sMonospace->renderUTF8("0", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 134 | LLFontGL::sMonospace->renderUTF8("0", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
136 | 135 | ||
137 | left = (mRect.getWidth()*1 / 6) - MAGIC_CHAR_WIDTH * 2; | 136 | left = (getRect().getWidth()*1 / 6) - MAGIC_CHAR_WIDTH * 2; |
138 | LLFontGL::sMonospace->renderUTF8("1", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 137 | LLFontGL::sMonospace->renderUTF8("1", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
139 | 138 | ||
140 | left = (mRect.getWidth()*2 / 6) - MAGIC_CHAR_WIDTH; | 139 | left = (getRect().getWidth()*2 / 6) - MAGIC_CHAR_WIDTH; |
141 | LLFontGL::sMonospace->renderUTF8("2", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 140 | LLFontGL::sMonospace->renderUTF8("2", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
142 | 141 | ||
143 | left = (mRect.getWidth()*3 / 6) - MAGIC_CHAR_WIDTH * 2; | 142 | left = (getRect().getWidth()*3 / 6) - MAGIC_CHAR_WIDTH * 2; |
144 | LLFontGL::sMonospace->renderUTF8("3", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 143 | LLFontGL::sMonospace->renderUTF8("3", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
145 | 144 | ||
146 | left = (mRect.getWidth()*4 / 6) - MAGIC_CHAR_WIDTH; | 145 | left = (getRect().getWidth()*4 / 6) - MAGIC_CHAR_WIDTH; |
147 | LLFontGL::sMonospace->renderUTF8("4", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 146 | LLFontGL::sMonospace->renderUTF8("4", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
148 | 147 | ||
149 | left = (mRect.getWidth()*5 / 6) - MAGIC_CHAR_WIDTH * 2; | 148 | left = (getRect().getWidth()*5 / 6) - MAGIC_CHAR_WIDTH * 2; |
150 | LLFontGL::sMonospace->renderUTF8("5", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 149 | LLFontGL::sMonospace->renderUTF8("5", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
151 | 150 | ||
152 | left = (mRect.getWidth()*6 / 6) - MAGIC_CHAR_WIDTH * 3; | 151 | left = (getRect().getWidth()*6 / 6) - MAGIC_CHAR_WIDTH * 3; |
153 | LLFontGL::sMonospace->renderUTF8("6 m/s", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); | 152 | LLFontGL::sMonospace->renderUTF8("6 m/s", 0, left, top, color, LLFontGL::LEFT, LLFontGL::TOP); |
154 | 153 | ||
155 | // draw idle time | 154 | // draw idle time |
@@ -158,6 +157,6 @@ void LLVelocityBar::draw() | |||
158 | 157 | ||
159 | // Draw energy level | 158 | // Draw energy level |
160 | left = 0; | 159 | left = 0; |
161 | right = (S32) (left + velocity * 0.33333f * mRect.getWidth() / 2.f); | 160 | right = (S32) (left + velocity * 0.33333f * getRect().getWidth() / 2.f); |
162 | gl_rect_2d(left, top, right, bottom, bar_color); | 161 | gl_rect_2d(left, top, right, bottom, bar_color); |
163 | } | 162 | } |