Esempio n. 1
0
void LLTextBox::draw()
{
	if (mBorderVisible)
	{
		gl_rect_2d_offset_local(getLocalRect(), 2, FALSE);
	}

	if( mBorderDropShadowVisible )
	{
		static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow");
		static S32 drop_shadow_tooltip = LLUI::sConfigGroup->getS32("DropShadowTooltip");
		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
			color_drop_shadow, drop_shadow_tooltip);
	}

	if (mBackgroundVisible)
	{
		LLRect r( 0, getRect().getHeight(), getRect().getWidth(), 0 );
		gl_rect_2d( r, mBackgroundColor );
	}

	S32 text_x = 0;
	switch( mHAlign )
	{
	case LLFontGL::LEFT:	
		text_x = mHPad;						
		break;
	case LLFontGL::HCENTER:
		text_x = getRect().getWidth() / 2;
		break;
	case LLFontGL::RIGHT:
		text_x = getRect().getWidth() - mHPad;
		break;
	}

	S32 text_y = getRect().getHeight() - mVPad;

	if ( getEnabled() )
	{
		if(mHasHover)
		{
			drawText( text_x, text_y, mHoverColor );
		}
		else
		{
			drawText( text_x, text_y, mTextColor );
		}				
	}
	else
	{
		drawText( text_x, text_y, mDisabledColor );
	}

	if (sDebugRects)
	{
		drawDebugRect();
	}

	mHasHover = FALSE; // This is reset every frame.
}
Esempio n. 2
0
// virtual
void LLModalDialog::draw()
{
	if (getVisible())
	{
		LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
		S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");

		gl_drop_shadow( 0, mRect.getHeight(), mRect.getWidth(), 0,
			shadow_color, shadow_lines);

		LLFloater::draw();

		if (mModal)
		{
			// If we've lost focus to a non-child, get it back ASAP.
			if( gFocusMgr.getTopCtrl() != this )
			{
				gFocusMgr.setTopCtrl( this );
			}

			if( !gFocusMgr.childHasKeyboardFocus( this ) )
			{
				setFocus(TRUE);
			}

			if( !gFocusMgr.childHasMouseCapture( this ) )
			{
				gFocusMgr.setMouseCapture( this );
			}
		}
	}
}
// virtual
void LLModalDialog::draw()
{
	static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
	static LLUICachedControl<S32> shadow_lines ("DropShadowFloater", 0);

	gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
		shadow_color, shadow_lines);

	LLFloater::draw();
	
	// Focus retrieval moved to LLFloaterView::refresh()
}
Esempio n. 4
0
// virtual
void LLStatusBar::draw()
{
	refresh();

	if (isBackgroundVisible())
	{
		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, 
			LLUI::sColorsGroup->getColor("ColorDropShadow"), 
			LLUI::sConfigGroup->getS32("DropShadowFloater") );
	}
	LLPanel::draw();
}
// virtual
void LLStatusBar::draw()
{
	refresh();

	if (isBackgroundVisible())
	{
		static const LLCachedControl<LLColor4> color_drop_shadow(*LLUI::sColorsGroup,"ColorDropShadow",LLColor4(LLColor4U(0,0,0,200)));
		static const LLCachedControl<S32> drop_shadow_floater(*LLUI::sConfigGroup,"DropShadowFloater");
		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, 
			color_drop_shadow, 
			drop_shadow_floater );
	}
	LLPanel::draw();
}
Esempio n. 6
0
// virtual
void LLToastAlertPanel::draw()
{
	// if the default button timer has just expired, activate the default button
	if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
	{
		mDefaultBtnTimer.stop();  // prevent this block from being run more than once
		LLToastPanel::setDefaultBtn(mButtonData[mDefaultOption].mButton);
	}

	static LLUIColor shadow_color = LLUIColorTable::instance().getColor("ColorDropShadow");
	static LLUICachedControl<S32> shadow_lines ("DropShadowFloater");

	gl_drop_shadow( 0, LLToastPanel::getRect().getHeight(), LLToastPanel::getRect().getWidth(), 0,
		shadow_color, shadow_lines);

	LLToastPanel::draw();
}
Esempio n. 7
0
// virtual
void LLAlertDialog::draw()
{
	// if the default button timer has just expired, activate the default button
	if(mDefaultBtnTimer.hasExpired() && mDefaultBtnTimer.getStarted())
	{
		mDefaultBtnTimer.stop();  // prevent this block from being run more than once
		setDefaultBtn(mDefaultButton);
	}

	static LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow");
	static S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater");

	gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0,
		shadow_color, shadow_lines);

	LLModalDialog::draw();
}
Esempio n. 8
0
void LLNavigationBar::draw()
{
	if(mPurgeTPHistoryItems)
	{
		LLTeleportHistory::getInstance()->purgeItems();
		mPurgeTPHistoryItems = false;
	}

	if (isBackgroundVisible())
	{
		static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
		static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow");
		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
                           color_drop_shadow, drop_shadow_floater );
	}

	LLPanel::draw();
}
void LLNavigationBar::draw()
{
//MK
//	if (gRRenabled && gAgent.mRRInterface.mContainsShowloc)
//	{
//		toggle_show_navigation_panel(LLSD(false));
//		gSavedSettings.setBOOL ("ShowNavbarNavigationPanel", FALSE);
//	}
//mk

	if (isBackgroundVisible())
	{
		static LLUICachedControl<S32> drop_shadow_floater ("DropShadowFloater", 0);
		static LLUIColor color_drop_shadow = LLUIColorTable::instance().getColor("ColorDropShadow");
		gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0,
                           color_drop_shadow, drop_shadow_floater );
	}

	LLPanel::draw();
}