mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-01 02:56:28 +03:00
Minor fixes.
--HG-- branch : dev-scene
This commit is contained in:
@@ -30,7 +30,8 @@ enum NODE_FLAGS_VALUES {
|
||||
NODE_FLAG_WIDGET = (1<<22),
|
||||
NODE_FLAG_WINDOW = (1<<23),
|
||||
NODE_FLAG_REPORT_SIZE_CHANGE_TO_CHILDS = (1<<24),
|
||||
NODE_FLAG_FREE_USE = (1<<25)
|
||||
NODE_FLAG_OVER_FIND_ALLOWED = (1<<25),
|
||||
NODE_FLAG_FREE_USE = (1<<26)
|
||||
};
|
||||
|
||||
#define UI_HALIGN_LEFT TEXT_ALIGN_LEFT
|
||||
|
||||
@@ -182,6 +182,7 @@ class EE_API UIManager {
|
||||
Color mHighlightInvalidationColor;
|
||||
Vector2f mMousePos;
|
||||
Vector2i mMousePosi;
|
||||
Vector2f mLastMousePos;
|
||||
Vector2i mMouseDownPos;
|
||||
|
||||
bool mInit;
|
||||
|
||||
@@ -729,7 +729,7 @@ Node * Node::getLastChild() const {
|
||||
Node * Node::overFind( const Vector2f& Point ) {
|
||||
Node * pOver = NULL;
|
||||
|
||||
if ( mEnabled && mVisible ) {
|
||||
if ( ( mNodeFlags & NODE_FLAG_OVER_FIND_ALLOWED ) && mEnabled && mVisible ) {
|
||||
updateWorldPolygon();
|
||||
|
||||
if ( mWorldBounds.contains( Point ) && mPoly.pointInside( Point ) ) {
|
||||
|
||||
@@ -255,7 +255,7 @@ void UIManager::update( const Time& elapsed ) {
|
||||
|
||||
if ( mInput->getReleaseTrigger() ) {
|
||||
if ( NULL != mFocusControl ) {
|
||||
if ( !wasDraggingControl ) {
|
||||
if ( !wasDraggingControl || mMousePos == mLastMousePos ) {
|
||||
if ( mOverControl != mFocusControl )
|
||||
setFocusControl( mOverControl );
|
||||
|
||||
@@ -281,6 +281,8 @@ void UIManager::update( const Time& elapsed ) {
|
||||
mFirstPress = false;
|
||||
}
|
||||
|
||||
mLastMousePos = mMousePos;
|
||||
|
||||
checkClose();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ UINode::UINode() :
|
||||
mBorder( NULL ),
|
||||
mDragButton( EE_BUTTON_LMASK )
|
||||
{
|
||||
mNodeFlags |= NODE_FLAG_UINODE;
|
||||
mNodeFlags |= NODE_FLAG_UINODE | NODE_FLAG_OVER_FIND_ALLOWED;
|
||||
}
|
||||
|
||||
UINode::~UINode() {
|
||||
|
||||
@@ -70,7 +70,6 @@ void UITooltip::show() {
|
||||
toFront();
|
||||
|
||||
setVisible( true );
|
||||
setEnabled( true );
|
||||
|
||||
if ( UIThemeManager::instance()->getDefaultEffectsEnabled() ) {
|
||||
startAlphaAnim( 255.f == mAlpha ? 0.f : mAlpha, 255.f, UIThemeManager::instance()->getControlsFadeInTime() );
|
||||
@@ -84,7 +83,6 @@ void UITooltip::hide() {
|
||||
disableFadeOut( UIThemeManager::instance()->getControlsFadeOutTime() );
|
||||
} else {
|
||||
setVisible( false );
|
||||
setEnabled( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user