A couple of quick fixes for the UI.

This commit is contained in:
spartanj
2011-01-09 19:37:03 -03:00
parent e5fb4c98e3
commit d2a159caa3
4 changed files with 12 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ cUIDragable::~cUIDragable() {
}
Uint32 cUIDragable::OnMouseDown( const eeVector2i& Pos, const Uint32 Flags ) {
if ( !( cInput::instance()->LastPressTrigger() & mDragButton ) && ( Flags & mDragButton ) && DragEnable() && !Dragging() ) {
if ( !( cUIManager::instance()->LastPressTrigger() & mDragButton ) && ( Flags & mDragButton ) && DragEnable() && !Dragging() ) {
Dragging( true );
mDragPoint = Pos;
}

View File

@@ -211,4 +211,8 @@ const Uint32& cUIManager::PressTrigger() const {
return mKM->PressTrigger();
}
const Uint32& cUIManager::LastPressTrigger() const {
return mKM->LastPressTrigger();
}
}}

View File

@@ -43,6 +43,8 @@ class EE_API cUIManager : public tSingleton<cUIManager> {
cInput * GetInput() const;
const Uint32& PressTrigger() const;
const Uint32& LastPressTrigger() const;
protected:
cEngine * mEE;
cInput * mKM;

View File

@@ -283,9 +283,12 @@ Uint32 cUIWindow::OnMessage( const cUIMessage * Msg ) {
return cUIComplexControl::OnMessage( Msg );
}
void cUIWindow::DoResize ( const cUIMessage * Msg ) {
if ( !( mWinFlags & UI_WIN_RESIZEABLE ) || !( Msg->Flags() & EE_BUTTON_LMASK ) || RESIZE_NONE != mResizeType )
if ( !( mWinFlags & UI_WIN_RESIZEABLE ) ||
!( Msg->Flags() & EE_BUTTON_LMASK ) ||
RESIZE_NONE != mResizeType ||
( cUIManager::instance()->LastPressTrigger() & EE_BUTTON_LMASK )
)
return;
DecideResizeType( Msg->Sender() );