Merge viewer-neko
commit
90ff9e8fb1
|
|
@ -275,10 +275,32 @@ LLOSInfo::LLOSInfo() :
|
|||
}
|
||||
}
|
||||
|
||||
S32 ubr = 0; // Windows 10 Update Build Revision, can be retrieved from a registry
|
||||
if (mMajorVer == 10)
|
||||
{
|
||||
DWORD cbData(sizeof(DWORD));
|
||||
DWORD data(0);
|
||||
HKEY key;
|
||||
BOOL ret_code = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &key);
|
||||
if (ERROR_SUCCESS == ret_code)
|
||||
{
|
||||
ret_code = RegQueryValueExW(key, L"UBR", 0, NULL, reinterpret_cast<LPBYTE>(&data), &cbData);
|
||||
if (ERROR_SUCCESS == ret_code)
|
||||
{
|
||||
ubr = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mOSString = mOSStringSimple;
|
||||
if (mBuild > 0)
|
||||
{
|
||||
mOSString += llformat("(Build %d)", mBuild);
|
||||
mOSString += llformat("(Build %d", mBuild);
|
||||
if (ubr > 0)
|
||||
{
|
||||
mOSString += llformat(".%d", ubr);
|
||||
}
|
||||
mOSString += ")";
|
||||
}
|
||||
|
||||
LLStringUtil::trim(mOSStringSimple);
|
||||
|
|
|
|||
|
|
@ -1044,7 +1044,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled()
|
|||
{
|
||||
bool ret_val = visibleItemsSelected();
|
||||
|
||||
if ( ret_val )
|
||||
if ( ret_val && !isMinimized())
|
||||
{
|
||||
std::string acvtive_panel_name;
|
||||
LLScrollListCtrl* list = NULL;
|
||||
|
|
|
|||
|
|
@ -479,7 +479,6 @@ void LLManip::renderXYZ(const LLVector3 &vec)
|
|||
{
|
||||
const S32 PAD = 10;
|
||||
std::string feedback_string;
|
||||
LLVector3 camera_pos = LLViewerCamera::getInstance()->getOrigin() + LLViewerCamera::getInstance()->getAtAxis();
|
||||
S32 window_center_x = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
|
||||
S32 window_center_y = gViewerWindow->getWorldViewRectScaled().getHeight() / 2;
|
||||
S32 vertical_offset = window_center_y - VERTICAL_OFFSET;
|
||||
|
|
@ -499,37 +498,47 @@ void LLManip::renderXYZ(const LLVector3 &vec)
|
|||
235,
|
||||
PAD * 2 + 10,
|
||||
LLColor4(0.f, 0.f, 0.f, 0.7f) );
|
||||
}
|
||||
gGL.popMatrix();
|
||||
|
||||
gViewerWindow->setup3DRender();
|
||||
LLFontGL* font = LLFontGL::getFontSansSerif();
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
LLGLDepthTest gls_depth(GL_FALSE);
|
||||
|
||||
{
|
||||
LLFontGL* font = LLFontGL::getFontSansSerif();
|
||||
LLLocale locale(LLLocale::USER_LOCALE);
|
||||
LLGLDepthTest gls_depth(GL_FALSE);
|
||||
// render drop shadowed text
|
||||
feedback_string = llformat("X: %.3f", vec.mV[VX]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
|
||||
// render drop shadowed text (manually because of bigger 'distance')
|
||||
F32 right_x;
|
||||
feedback_string = llformat("X: %.3f", vec.mV[VX]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
|
||||
feedback_string = llformat("Y: %.3f", vec.mV[VY]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
|
||||
|
||||
feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
|
||||
feedback_string = llformat("Y: %.3f", vec.mV[VY]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
|
||||
// render text on top
|
||||
feedback_string = llformat("X: %.3f", vec.mV[VX]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -102.f, (F32)vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f), FALSE);
|
||||
feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f + 1.f, window_center_y + vertical_offset - 2.f, LLColor4::black,
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
|
||||
gGL.diffuseColor3f(0.5f, 1.f, 0.5f);
|
||||
feedback_string = llformat("Y: %.3f", vec.mV[VY]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -27.f, (F32)vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f), FALSE);
|
||||
|
||||
gGL.diffuseColor3f(0.5f, 0.5f, 1.f);
|
||||
feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
|
||||
hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *font, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, 48.f, (F32)vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f), FALSE);
|
||||
}
|
||||
// render text on top
|
||||
feedback_string = llformat("X: %.3f", vec.mV[VX]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 102.f, window_center_y + vertical_offset, LLColor4(1.f, 0.5f, 0.5f, 1.f),
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
|
||||
feedback_string = llformat("Y: %.3f", vec.mV[VY]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x - 27.f, window_center_y + vertical_offset, LLColor4(0.5f, 1.f, 0.5f, 1.f),
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
|
||||
feedback_string = llformat("Z: %.3f", vec.mV[VZ]);
|
||||
font->render(utf8str_to_wstring(feedback_string), 0, window_center_x + 48.f, window_center_y + vertical_offset, LLColor4(0.5f, 0.5f, 1.f, 1.f),
|
||||
LLFontGL::LEFT, LLFontGL::BASELINE,
|
||||
LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, 1000, &right_x);
|
||||
}
|
||||
gGL.popMatrix();
|
||||
|
||||
gViewerWindow->setup3DRender();
|
||||
}
|
||||
|
||||
void LLManip::renderTickText(const LLVector3& pos, const std::string& text, const LLColor4 &color)
|
||||
|
|
|
|||
|
|
@ -121,8 +121,22 @@ BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||
mMouseDownX = x;
|
||||
mMouseDownY = y;
|
||||
|
||||
//left mouse down always picks transparent (but see handleMouseUp)
|
||||
mPick = gViewerWindow->pickImmediate(x, y, TRUE, FALSE);
|
||||
|
||||
mPick = gViewerWindow->pickImmediate(x, y, FALSE, FALSE);
|
||||
LLViewerObject *object = mPick.getObject();
|
||||
LLViewerObject *parent = object ? object->getRootEdit() : NULL;
|
||||
if (!object
|
||||
|| object->isAttachment()
|
||||
|| object->getClickAction() == CLICK_ACTION_DISABLED
|
||||
|| (!useClickAction(mask, object, parent) && !object->flagHandleTouch() && !(parent && parent->flagHandleTouch())))
|
||||
{
|
||||
// Unless we are hovering over actionable visible object
|
||||
// left mouse down always picks transparent (but see handleMouseUp).
|
||||
// Also see LLToolPie::handleHover() - priorities are a bit different there.
|
||||
// Todo: we need a more consistent set of rules to work with
|
||||
mPick = gViewerWindow->pickImmediate(x, y, TRUE /*transparent*/, FALSE);
|
||||
}
|
||||
|
||||
mPick.mKeyMask = mask;
|
||||
|
||||
mMouseButtonDown = true;
|
||||
|
|
|
|||
|
|
@ -1928,9 +1928,12 @@ BOOL LLWorldMapView::handleDoubleClick( S32 x, S32 y, MASK mask )
|
|||
{
|
||||
// <FS:Ansariel> Show parcel details instead of search with possible useless result
|
||||
//LLVector3d pos_global = viewPosToGlobal(x, y);
|
||||
//LLSimInfo* info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
|
||||
//LLFloaterReg::hideInstance("world_map");
|
||||
//LLFloaterReg::showInstance("search", LLSD().with("category", "land").with("query", info->getName()));
|
||||
//std::string sim_name;
|
||||
//if (LLWorldMap::getInstance()->simNameFromPosGlobal(pos_global, sim_name))
|
||||
//{
|
||||
// LLFloaterReg::hideInstance("world_map");
|
||||
// LLFloaterReg::showInstance("search", LLSD().with("category", "land").with("query", sim_name));
|
||||
//}
|
||||
LLFloaterReg::hideInstance("world_map");
|
||||
LLUrlAction::executeSLURL(LLSLURL("parcel", id, "about").getSLURLString());
|
||||
// </FS:Ansariel>
|
||||
|
|
|
|||
Loading…
Reference in New Issue