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

@@ -158,8 +158,8 @@ void LLUI::cleanupClass()
void LLUI::setMousePositionScreen(S32 x, S32 y)
{
S32 screen_x, screen_y;
screen_x = llround((F32)x * getScaleFactor().mV[VX]);
screen_y = llround((F32)y * getScaleFactor().mV[VY]);
screen_x = llmath::llround((F32)x * getScaleFactor().mV[VX]);
screen_y = llmath::llround((F32)y * getScaleFactor().mV[VY]);
LLView::getWindow()->setCursorPosition(LLCoordGL(screen_x, screen_y).convert());
}
@@ -170,8 +170,8 @@ void LLUI::getMousePositionScreen(S32 *x, S32 *y)
LLCoordWindow cursor_pos_window;
getWindow()->getCursorPosition(&cursor_pos_window);
LLCoordGL cursor_pos_gl(cursor_pos_window.convert());
*x = llround((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
*y = llround((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]);
*x = llmath::llround((F32)cursor_pos_gl.mX / getScaleFactor().mV[VX]);
*y = llmath::llround((F32)cursor_pos_gl.mY / getScaleFactor().mV[VX]);
}
//static
@@ -262,15 +262,15 @@ LLVector2 LLUI::getWindowSize()
//static
void LLUI::screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y)
{
*gl_x = llround((F32)screen_x * getScaleFactor().mV[VX]);
*gl_y = llround((F32)screen_y * getScaleFactor().mV[VY]);
*gl_x = llmath::llround((F32)screen_x * getScaleFactor().mV[VX]);
*gl_y = llmath::llround((F32)screen_y * getScaleFactor().mV[VY]);
}
//static
void LLUI::glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y)
{
*screen_x = llround((F32)gl_x / getScaleFactor().mV[VX]);
*screen_y = llround((F32)gl_y / getScaleFactor().mV[VY]);
*screen_x = llmath::llround((F32)gl_x / getScaleFactor().mV[VX]);
*screen_y = llmath::llround((F32)gl_y / getScaleFactor().mV[VY]);
}
//static