aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-06-09 09:41:04 -0700
committerMcCabe Maxsted2009-06-09 09:41:04 -0700
commite5dbb8e4dc05e664102362685ddca94f37cdf575 (patch)
tree93e695263553adadc423cf7e7d2e4b046adb8a7a /linden/indra/llui
parentFixed the Resident Chooser showing hair instead of calling cards (diff)
downloadmeta-impy-e5dbb8e4dc05e664102362685ddca94f37cdf575.zip
meta-impy-e5dbb8e4dc05e664102362685ddca94f37cdf575.tar.gz
meta-impy-e5dbb8e4dc05e664102362685ddca94f37cdf575.tar.bz2
meta-impy-e5dbb8e4dc05e664102362685ddca94f37cdf575.tar.xz
Backported 1.23's minimap conversion to XUI
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llui.cpp12
-rw-r--r--linden/indra/llui/llui.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp
index f3e73fd..8a7b80e 100644
--- a/linden/indra/llui/llui.cpp
+++ b/linden/indra/llui/llui.cpp
@@ -1645,6 +1645,18 @@ void LLUI::setCursorPositionLocal(const LLView* viewp, S32 x, S32 y)
1645 setCursorPositionScreen(screen_x, screen_y); 1645 setCursorPositionScreen(screen_x, screen_y);
1646} 1646}
1647 1647
1648//static
1649void LLUI::getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y)
1650{
1651 LLCoordWindow cursor_pos_window;
1652 LLView::getWindow()->getCursorPosition(&cursor_pos_window);
1653 LLCoordGL cursor_pos_gl;
1654 LLView::getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl);
1655 cursor_pos_gl.mX = llround((F32)cursor_pos_gl.mX / LLUI::sGLScaleFactor.mV[VX]);
1656 cursor_pos_gl.mY = llround((F32)cursor_pos_gl.mY / LLUI::sGLScaleFactor.mV[VY]);
1657 viewp->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, x, y);
1658}
1659
1648// On Windows, the user typically sets the language when they install the 1660// On Windows, the user typically sets the language when they install the
1649// app (by running it with a shortcut that sets InstallLanguage). On Mac, 1661// app (by running it with a shortcut that sets InstallLanguage). On Mac,
1650// or on Windows if the SecondLife.exe executable is run directly, the 1662// or on Windows if the SecondLife.exe executable is run directly, the
diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h
index 1e731f1..b51b132 100644
--- a/linden/indra/llui/llui.h
+++ b/linden/indra/llui/llui.h
@@ -175,6 +175,7 @@ public:
175 static std::string locateSkin(const std::string& filename); 175 static std::string locateSkin(const std::string& filename);
176 static void setCursorPositionScreen(S32 x, S32 y); 176 static void setCursorPositionScreen(S32 x, S32 y);
177 static void setCursorPositionLocal(const LLView* viewp, S32 x, S32 y); 177 static void setCursorPositionLocal(const LLView* viewp, S32 x, S32 y);
178 static void getCursorPositionLocal(const LLView* viewp, S32 *x, S32 *y);
178 static void setScaleFactor(const LLVector2& scale_factor); 179 static void setScaleFactor(const LLVector2& scale_factor);
179 static void setLineWidth(F32 width); 180 static void setLineWidth(F32 width);
180 static LLUIImage* getUIImage(const std::string& name); 181 static LLUIImage* getUIImage(const std::string& name);