All your codebase are belong to us.

This commit is contained in:
Drake Arconis
2014-08-22 00:15:09 -04:00
parent 2a64c07215
commit 948ebe5213
110 changed files with 661 additions and 611 deletions

View File

@@ -512,7 +512,7 @@ std::vector<S32> LLLineEditor::getMisspelledWordsPositions()
{
//misspelled word here, and you have just right clicked on it!
//get the center of this word..
//S32 center = llround( (wordEnd-wordStart)/2 ) + wordStart;
//S32 center = llmath::llround( (wordEnd-wordStart)/2 ) + wordStart;
//turn this cursor position into a pixel pos
//center = findPixelNearestPos(center-getCursor());
@@ -769,7 +769,7 @@ BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask)
// Scroll if mouse cursor outside of bounds
if (mScrollTimer.hasExpired())
{
S32 increment = llround(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME);
S32 increment = llmath::llround(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME);
mScrollTimer.reset(AUTO_SCROLL_TIME);
if( (x < mMinHPixels) && (mScrollHPos > 0 ) )
{
@@ -1929,7 +1929,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
select_left - mScrollHPos,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right);
}
@@ -1938,8 +1938,8 @@ void LLLineEditor::draw()
LLColor4 color(1.f - bg_color.mV[0], 1.f - bg_color.mV[1], 1.f - bg_color.mV[2], alpha );
// selected middle
S32 width = mGLFont->getWidth(mText.getWString().c_str(), mScrollHPos + rendered_text, select_right - mScrollHPos - rendered_text);
width = llmin(width, mMaxHPixels - llround(rendered_pixels_right));
gl_rect_2d(llround(rendered_pixels_right), cursor_top, llround(rendered_pixels_right)+width, cursor_bottom, color);
width = llmin(width, mMaxHPixels - llmath::llround(rendered_pixels_right));
gl_rect_2d(llmath::llround(rendered_pixels_right), cursor_top, llmath::llround(rendered_pixels_right)+width, cursor_bottom, color);
LLColor4 tmp_color( 1.f - text_color.mV[0], 1.f - text_color.mV[1], 1.f - text_color.mV[2], alpha );
rendered_text += mGLFont->render(
@@ -1950,7 +1950,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
select_right - mScrollHPos - rendered_text,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right);
}
@@ -1965,7 +1965,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
S32_MAX,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right);
}
}
@@ -1979,7 +1979,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
S32_MAX,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right);
}
#if 0 // for when we're ready for image art.
@@ -2047,7 +2047,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
S32_MAX,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right, FALSE);
}
@@ -2072,7 +2072,7 @@ void LLLineEditor::draw()
LLFontGL::NORMAL,
LLFontGL::NO_SHADOW,
S32_MAX,
mMaxHPixels - llround(rendered_pixels_right),
mMaxHPixels - llmath::llround(rendered_pixels_right),
&rendered_pixels_right, FALSE);
}
// Draw children (border)
@@ -3021,7 +3021,7 @@ void LLLineEditor::markAsPreedit(S32 position, S32 length)
S32 LLLineEditor::getPreeditFontSize() const
{
return llround(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]);
return llmath::llround(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]);
}
void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace)