mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
Added cUISelectButton control.
Added cUIWinMenu control ( window menu ). Some minor changes on the UI controls.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user