Added cUISelectButton control.

Added cUIWinMenu control ( window menu ).
Some minor changes on the UI controls.
This commit is contained in:
spartanj
2011-04-18 19:45:13 -03:00
parent e6f8b70a1c
commit 9f4f013a9e
25 changed files with 543 additions and 23 deletions

View File

@@ -10,7 +10,7 @@ cUIComplexControl::cUIComplexControl( const cUIComplexControl::CreateParams& Par
{
mType |= UI_TYPE_GET( UI_TYPE_CONTROL_COMPLEX );
mDistToBorder = eeVector2i( mParentCtrl->Size().x - ( mPos.x + mSize.x ), mParentCtrl->Size().y - ( mPos.y + mSize.y ) );
CalcDistToBorder();
TooltipText( Params.TooltipText );
}
@@ -19,6 +19,10 @@ cUIComplexControl::~cUIComplexControl() {
eeSAFE_DELETE( mTooltip );
}
void cUIComplexControl::CalcDistToBorder() {
mDistToBorder = eeVector2i( mParentCtrl->Size().x - ( mPos.x + mSize.x ), mParentCtrl->Size().y - ( mPos.y + mSize.y ) );
}
void cUIComplexControl::Update() {
if ( mVisible && NULL != mTooltip && mTooltip->Text().size() ) {
if ( IsMouseOverMeOrChilds() ) {
@@ -130,7 +134,7 @@ void cUIComplexControl::OnParentSizeChange() {
}
if ( mFlags & UI_ANCHOR_RIGHT ) {
newSize.x = mParentCtrl->Size().x - mPos.x - mDistToBorder.x;
newSize.x = mParentCtrl->Size().Width() - mPos.x - mDistToBorder.x;
if ( newSize.x < mMinControlSize.Width() )
newSize.y = mMinControlSize.Width();