diff --git a/src/gaming/cmap.cpp b/src/gaming/cmap.cpp index f1cd6d40f..327d88560 100644 --- a/src/gaming/cmap.cpp +++ b/src/gaming/cmap.cpp @@ -323,8 +323,6 @@ void cMap::CalcTilesClip() { mStartTile.x = -foff.x / ( mTileSize.x * mScale ) - mExtraTiles.x; mStartTile.y = -foff.y / ( mTileSize.y * mScale ) - mExtraTiles.y; - mEndTile.x = mStartTile.x + eeRoundUp( (eeFloat)mViewSize.x / ( (eeFloat)mTileSize.x * mScale ) ) + 1 + mExtraTiles.x; - mEndTile.y = mStartTile.y + eeRoundUp( (eeFloat)mViewSize.y / ( (eeFloat)mTileSize.y * mScale ) ) + 1 + mExtraTiles.y; if ( mStartTile.x < 0 ) mStartTile.x = 0; @@ -332,6 +330,9 @@ void cMap::CalcTilesClip() { if ( mStartTile.y < 0 ) mStartTile.y = 0; + mEndTile.x = mStartTile.x + eeRoundUp( (eeFloat)mViewSize.x / ( (eeFloat)mTileSize.x * mScale ) ) + 1 + mExtraTiles.x; + mEndTile.y = mStartTile.y + eeRoundUp( (eeFloat)mViewSize.y / ( (eeFloat)mTileSize.y * mScale ) ) + 1 + mExtraTiles.y; + if ( mEndTile.x > mSize.x ) mEndTile.x = mSize.x; @@ -393,7 +394,17 @@ void cMap::UpdateOffscale() { eeVector2f totSizeT( mTileSize.x * mSize.x - mViewSize.x , mTileSize.y * mSize.y - mViewSize.y ); eeVector2f totSizeS( mTileSize.x * mSize.x * mScale - mViewSize.x , mTileSize.y * mSize.y * mScale - mViewSize.y ); - mOffscale = eeVector2f( totSizeS.x / totSizeT.x, totSizeS.y / totSizeT.y ); + if ( 0 == totSizeT.x ) { + mOffscale.x = 0; + } else { + mOffscale.x = totSizeS.x / totSizeT.x; + } + + if ( 0 == totSizeT.y ) { + mOffscale.y = 0; + } else { + mOffscale.y = totSizeS.y / totSizeT.y; + } } const eeFloat& cMap::Scale() const { diff --git a/src/graphics/ctextcache.cpp b/src/graphics/ctextcache.cpp index 7c4091baa..9bb8c7b98 100644 --- a/src/graphics/ctextcache.cpp +++ b/src/graphics/ctextcache.cpp @@ -9,8 +9,8 @@ cTextCache::cTextCache() : mNumLines(1), mFontColor(255,255,255,255), mFontShadowColor(0,0,0,255), - mCachedCoords(false), - mFlags(0) + mFlags(0), + mCachedCoords(false) { } diff --git a/src/graphics/ctextcache.hpp b/src/graphics/ctextcache.hpp index d63a6a862..ce5330351 100644 --- a/src/graphics/ctextcache.hpp +++ b/src/graphics/ctextcache.hpp @@ -58,7 +58,7 @@ class EE_API cTextCache { protected: friend class cFont; - String mText; + String mText; cFont * mFont; std::vector mLinesWidth; eeFloat mCachedWidth; @@ -69,10 +69,12 @@ class EE_API cTextCache { std::vector mRenderCoords; std::vector mColors; - bool mCachedCoords; + Uint32 mFlags; Uint32 mVertexNumCached; + bool mCachedCoords; + void UpdateCoords(); const bool& CachedCoords() const; diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index b4ad29a5a..ac3558a53 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -395,6 +395,7 @@ void cEETest::CreateUI() { PBParams.PosSet( 20, 197 ); PBParams.Size = eeSize( 200, 16 ); PBParams.DisplayPercent = true; + PBParams.MovementSpeed = eeVector2f( -64, 0 ); mProgressBar = eeNew( cUIProgressBar, ( PBParams ) ); mProgressBar->Visible( true ); mProgressBar->Enabled( true ); diff --git a/src/ui/cuiaquatheme.hpp b/src/ui/cuiaquatheme.hpp index 98a3b9ef9..804e035db 100644 --- a/src/ui/cuiaquatheme.hpp +++ b/src/ui/cuiaquatheme.hpp @@ -11,7 +11,7 @@ class EE_API cUIAquaTheme : public cUITheme { virtual cUIPopUpMenu * CreatePopUpMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS | UI_AUTO_SIZE | UI_AUTO_PADDING, Uint32 RowHeight = 0, eeRecti PaddingContainer = eeRecti(), Uint32 MinWidth = 100, Uint32 MinSpaceForIcons = 16, Uint32 MinRightMargin = 8 ); - virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = true, bool VerticalExpand = false, eeVector2f MovementSpeed = eeVector2f( 64, 0 ), eeRectf FillerMargin = eeRectf() ); + virtual cUIProgressBar * CreateProgressBar( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, bool DisplayPercent = true, bool VerticalExpand = false, eeVector2f MovementSpeed = eeVector2f( -64, 0 ), eeRectf FillerMargin = eeRectf() ); virtual cUIWinMenu * CreateWinMenu( cUIControl * Parent = NULL, const eeSize& Size = eeSize(), const eeVector2i& Pos = eeVector2i(), const Uint32& Flags = UI_CONTROL_DEFAULT_FLAGS, Uint32 MarginBetweenButtons = 0, Uint32 ButtonMargin = 12, Uint32 MenuHeight = 0, Uint32 FirstButtonMargin = 1 ); diff --git a/src/ui/cuicheckbox.cpp b/src/ui/cuicheckbox.cpp index 4bcb1b6b0..5d6a41547 100644 --- a/src/ui/cuicheckbox.cpp +++ b/src/ui/cuicheckbox.cpp @@ -40,8 +40,8 @@ bool cUICheckBox::IsType( const Uint32& type ) const { void cUICheckBox::SetTheme( cUITheme * Theme ) { cUIControl::SetTheme( Theme, "checkbox" ); - mActiveButton->ForceThemeSkin ( Theme, "checkbox_active" ); - mInactiveButton->ForceThemeSkin ( Theme, "checkbox_inactive" ); + mActiveButton->SetSkin ( Theme, "checkbox_active" ); + mInactiveButton->SetSkin ( Theme, "checkbox_inactive" ); DoAfterSetTheme(); } diff --git a/src/ui/cuicontrol.cpp b/src/ui/cuicontrol.cpp index ac575dae5..0eb78e59e 100644 --- a/src/ui/cuicontrol.cpp +++ b/src/ui/cuicontrol.cpp @@ -40,7 +40,7 @@ cUIControl::cUIControl( const CreateParams& Params ) : } cUIControl::~cUIControl() { - eeSAFE_DELETE( mSkinState ); + SafeDeleteSkinState(); eeSAFE_DELETE( mBackground ); eeSAFE_DELETE( mBorder ); @@ -255,7 +255,7 @@ void cUIControl::Update() { } if ( mControlFlags & UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD ) - WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD_POS, 0 ); + WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD, 0 ); } void cUIControl::SendMouseEvent( const Uint32& Event, const eeVector2i& Pos, const Uint32& Flags ) { @@ -305,11 +305,11 @@ Uint32 cUIControl::OnMouseClick( const eeVector2i& Pos, const Uint32 Flags ) { } bool cUIControl::IsMouseOver() { - return 0 != Read32BitKey( &mControlFlags, UI_CTRL_FLAG_MOUSEOVER_POS ); + return mControlFlags & UI_CTRL_FLAG_MOUSEOVER; } bool cUIControl::IsMouseOverMeOrChilds() { - return 0 != Read32BitKey( &mControlFlags, UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD_POS ); + return mControlFlags & UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD; } Uint32 cUIControl::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags ) { @@ -318,7 +318,7 @@ Uint32 cUIControl::OnMouseDoubleClick( const eeVector2i& Pos, const Uint32 Flags } Uint32 cUIControl::OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { - WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_POS, 1 ); + WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER, 1 ); SendMouseEvent( cUIEvent::EventMouseEnter, Pos, Flags ); @@ -328,7 +328,7 @@ Uint32 cUIControl::OnMouseEnter( const eeVector2i& Pos, const Uint32 Flags ) { } Uint32 cUIControl::OnMouseExit( const eeVector2i& Pos, const Uint32 Flags ) { - WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_POS, 0 ); + WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER, 0 ); SendMouseEvent( cUIEvent::EventMouseExit, Pos, Flags ); @@ -386,7 +386,7 @@ void cUIControl::VAlign( Uint32 valign ) { } void cUIControl::FillBackground( bool enabled ) { - SetFlagValue( &mFlags, UI_FILL_BACKGROUND, enabled ? 1 : 0 ); + WriteFlag( UI_FILL_BACKGROUND, enabled ? 1 : 0 ); if ( enabled && NULL == mBackground ) { mBackground = eeNew( cUIBackground, () ); @@ -394,7 +394,7 @@ void cUIControl::FillBackground( bool enabled ) { } void cUIControl::Border( bool enabled ) { - SetFlagValue( &mFlags, UI_BORDER, enabled ? 1 : 0 ); + WriteFlag( UI_BORDER, enabled ? 1 : 0 ); if ( enabled && NULL == mBorder ) { mBorder = eeNew( cUIBorder, () ); @@ -764,7 +764,7 @@ cUIControl * cUIControl::OverFind( const eeVector2f& Point ) { UpdateQuad(); if ( PointInsidePolygon2( mPoly, Point ) ) { - WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD_POS, 1 ); + WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD, 1 ); cUIControl * ChildLoop = mChildLast; @@ -905,29 +905,42 @@ void cUIControl::SetTheme( cUITheme * Theme ) { SetTheme( Theme, "control" ); } +void cUIControl::SafeDeleteSkinState() { + if ( NULL != mSkinState && ( mControlFlags & UI_CTRL_FLAG_SKIN_OWNER ) ) { + cUISkin * tSkin = mSkinState->GetSkin(); + + eeSAFE_DELETE( tSkin ); + } + + eeSAFE_DELETE( mSkinState ); +} + void cUIControl::SetTheme( cUITheme * Theme, const std::string& ControlName ) { if ( NULL != Theme ) { - cUISkin * tSkin = NULL; - - if ( mSkinForcedName.size() ) - tSkin = Theme->GetByName( Theme->Abbr() + "_" + mSkinForcedName ); - else - tSkin = Theme->GetByName( Theme->Abbr() + "_" + ControlName ); + cUISkin * tSkin = Theme->GetByName( Theme->Abbr() + "_" + ControlName ); if ( NULL != tSkin ) { - eeSAFE_DELETE( mSkinState ); + SafeDeleteSkinState(); mSkinState = eeNew( cUISkinState, ( tSkin ) ); } } } -void cUIControl::ForceThemeSkin( cUITheme * Theme, const std::string& ControlName ) { - mSkinForcedName = ControlName; - +void cUIControl::SetSkin( cUITheme * Theme, const std::string& ControlName ) { SetTheme( Theme, ControlName ); } +void cUIControl::SetSkin( cUISkin * Skin ) { + if ( NULL != Skin ) { + SafeDeleteSkinState(); + + WriteCtrlFlag( UI_CTRL_FLAG_SKIN_OWNER, 1 ); + + mSkinState = eeNew( cUISkinState, ( Skin ) ); + } +} + void cUIControl::OnStateChange() { } @@ -984,8 +997,8 @@ cUISkin * cUIControl::GetSkin() { return NULL; } -void cUIControl::WriteCtrlFlag( const Uint32& Pos, const Uint32& Val ) { - Write32BitKey( &mControlFlags, Pos, Val ); +void cUIControl::WriteCtrlFlag( const Uint32& Flag, const Uint32& Val ) { + SetFlagValue( &mControlFlags, Flag, Val ); } void cUIControl::WriteFlag( const Uint32& Flag, const Uint32& Val ) { diff --git a/src/ui/cuicontrol.hpp b/src/ui/cuicontrol.hpp index b04d3c3c4..33bb6c0c3 100644 --- a/src/ui/cuicontrol.hpp +++ b/src/ui/cuicontrol.hpp @@ -197,7 +197,9 @@ class EE_API cUIControl { cUISkin * GetSkin(); - void ForceThemeSkin( cUITheme * Theme, const std::string& ControlName ); + void SetSkin( cUITheme * Theme, const std::string& ControlName ); + + void SetSkin( cUISkin * Skin ); cUIControl * ChildGetFirst() const; @@ -260,8 +262,6 @@ class EE_API cUIControl { UIEventsMap mEvents; - std::string mSkinForcedName; - bool mVisible; bool mEnabled; @@ -355,7 +355,7 @@ class EE_API cUIControl { void UpdateChildsScreenPos(); - void WriteCtrlFlag( const Uint32& Pos, const Uint32& Val ); + void WriteCtrlFlag( const Uint32& Flag, const Uint32& Val ); void WriteFlag( const Uint32& Flag, const Uint32& Val ); @@ -366,6 +366,8 @@ class EE_API cUIControl { eeFloat Elapsed(); eeRecti MakePadding( bool PadLeft = true, bool PadRight = true, bool PadTop = true, bool PadBottom = true, bool SkipFlags = false ); + + void SafeDeleteSkinState(); }; }} diff --git a/src/ui/cuidragable.cpp b/src/ui/cuidragable.cpp index ff340e3f1..a9b9e7fd5 100644 --- a/src/ui/cuidragable.cpp +++ b/src/ui/cuidragable.cpp @@ -86,7 +86,7 @@ bool cUIDragable::Dragging() const { } void cUIDragable::Dragging( const bool& dragging ) { - WriteCtrlFlag( UI_CTRL_FLAG_DRAGGING_POS, true == dragging ); + WriteCtrlFlag( UI_CTRL_FLAG_DRAGGING, true == dragging ); } void cUIDragable::DragButton( const Uint32& Button ) { diff --git a/src/ui/cuiradiobutton.cpp b/src/ui/cuiradiobutton.cpp index eed56b5ff..9b13c8ec3 100644 --- a/src/ui/cuiradiobutton.cpp +++ b/src/ui/cuiradiobutton.cpp @@ -44,8 +44,8 @@ bool cUIRadioButton::IsType( const Uint32& type ) const { void cUIRadioButton::SetTheme( cUITheme * Theme ) { cUIControl::SetTheme( Theme, "radiobutton" ); - mActiveButton->ForceThemeSkin ( Theme, "radiobutton_active" ); - mInactiveButton->ForceThemeSkin ( Theme, "radiobutton_inactive" ); + mActiveButton->SetSkin ( Theme, "radiobutton_active" ); + mInactiveButton->SetSkin ( Theme, "radiobutton_inactive" ); cShape * tShape = NULL; cUISkin * tSkin = mActiveButton->GetSkin(); diff --git a/src/ui/cuiscrollbar.cpp b/src/ui/cuiscrollbar.cpp index e242cdeb1..29801b523 100644 --- a/src/ui/cuiscrollbar.cpp +++ b/src/ui/cuiscrollbar.cpp @@ -55,18 +55,18 @@ bool cUIScrollBar::IsType( const Uint32& type ) const { void cUIScrollBar::SetTheme( cUITheme * Theme ) { if ( !IsVertical() ) { cUIControl::SetTheme( Theme, "hscrollbar" ); - mSlider->ForceThemeSkin( Theme, "hscrollbar_slider" ); - mSlider->GetBackSlider()->ForceThemeSkin( Theme, "hscrollbar_bg" ); - mSlider->GetSliderButton()->ForceThemeSkin( Theme, "hscrollbar_button" ); - mBtnUp->ForceThemeSkin( Theme, "hscrollbar_btnup" ); - mBtnDown->ForceThemeSkin( Theme, "hscrollbar_btndown" ); + mSlider->SetSkin( Theme, "hscrollbar_slider" ); + mSlider->GetBackSlider()->SetSkin( Theme, "hscrollbar_bg" ); + mSlider->GetSliderButton()->SetSkin( Theme, "hscrollbar_button" ); + mBtnUp->SetSkin( Theme, "hscrollbar_btnup" ); + mBtnDown->SetSkin( Theme, "hscrollbar_btndown" ); } else { cUIControl::SetTheme( Theme, "vscrollbar" ); - mSlider->ForceThemeSkin( Theme, "vscrollbar_slider" ); - mSlider->GetBackSlider()->ForceThemeSkin( Theme, "vscrollbar_bg" ); - mSlider->GetSliderButton()->ForceThemeSkin( Theme, "vscrollbar_button" ); - mBtnUp->ForceThemeSkin( Theme, "vscrollbar_btnup" ); - mBtnDown->ForceThemeSkin( Theme, "vscrollbar_btndown" ); + mSlider->SetSkin( Theme, "vscrollbar_slider" ); + mSlider->GetBackSlider()->SetSkin( Theme, "vscrollbar_bg" ); + mSlider->GetSliderButton()->SetSkin( Theme, "vscrollbar_button" ); + mBtnUp->SetSkin( Theme, "vscrollbar_btnup" ); + mBtnDown->SetSkin( Theme, "vscrollbar_btndown" ); } cShape * tShape = NULL; diff --git a/src/ui/cuislider.cpp b/src/ui/cuislider.cpp index 4e77f1117..42a5fae0d 100644 --- a/src/ui/cuislider.cpp +++ b/src/ui/cuislider.cpp @@ -62,13 +62,13 @@ void cUISlider::SetTheme( cUITheme * Theme ) { if ( !mVertical ) { cUIControl::SetTheme( Theme, "hslider" ); - mBackSlider->ForceThemeSkin( Theme, "hslider_bg" ); - mSlider->ForceThemeSkin( Theme, "hslider_button" ); + mBackSlider->SetSkin( Theme, "hslider_bg" ); + mSlider->SetSkin( Theme, "hslider_button" ); } else { cUIControl::SetTheme( Theme, "vslider" ); - mBackSlider->ForceThemeSkin( Theme, "vslider_bg" ); - mSlider->ForceThemeSkin( Theme, "vslider_button" ); + mBackSlider->SetSkin( Theme, "vslider_bg" ); + mSlider->SetSkin( Theme, "vslider_button" ); } AdjustChilds(); diff --git a/src/ui/cuispinbox.cpp b/src/ui/cuispinbox.cpp index e89f8f153..4a966f207 100644 --- a/src/ui/cuispinbox.cpp +++ b/src/ui/cuispinbox.cpp @@ -60,9 +60,9 @@ bool cUISpinBox::IsType( const Uint32& type ) const { void cUISpinBox::SetTheme( cUITheme * Theme ) { cUIControl::SetTheme ( Theme, "spinbox" ); - mInput->ForceThemeSkin ( Theme, "spinbox_input" ); - mPushUp->ForceThemeSkin ( Theme, "spinbox_btnup" ); - mPushDown->ForceThemeSkin ( Theme, "spinbox_btndown" ); + mInput->SetSkin ( Theme, "spinbox_input" ); + mPushUp->SetSkin ( Theme, "spinbox_btnup" ); + mPushDown->SetSkin ( Theme, "spinbox_btndown" ); cShape * tShape = NULL; cUISkin * tSkin = NULL; diff --git a/src/ui/cuitextedit.cpp b/src/ui/cuitextedit.cpp index d79dda111..e58e295b1 100644 --- a/src/ui/cuitextedit.cpp +++ b/src/ui/cuitextedit.cpp @@ -87,7 +87,7 @@ bool cUITextEdit::IsType( const Uint32& type ) const { void cUITextEdit::SetTheme( cUITheme * Theme ) { cUIControl::SetTheme( Theme, "textedit" ); - mTextInput->ForceThemeSkin( Theme, "textedit_box" ); + mTextInput->SetSkin( Theme, "textedit_box" ); AutoPadding(); diff --git a/src/ui/cuiwindow.cpp b/src/ui/cuiwindow.cpp index a942ee522..6c379c1fc 100644 --- a/src/ui/cuiwindow.cpp +++ b/src/ui/cuiwindow.cpp @@ -171,24 +171,24 @@ void cUIWindow::SetTheme( cUITheme *Theme ) { cUIComplexControl::SetTheme( Theme ); if ( !( mWinFlags & UI_WIN_NO_BORDER ) ) { - mContainer->ForceThemeSkin ( Theme, "winback" ); - mWindowDecoration->ForceThemeSkin ( Theme, "windeco" ); - mBorderLeft->ForceThemeSkin ( Theme, "winborderleft" ); - mBorderRight->ForceThemeSkin ( Theme, "winborderright" ); - mBorderBottom->ForceThemeSkin ( Theme, "winborderbottom" ); + mContainer->SetSkin ( Theme, "winback" ); + mWindowDecoration->SetSkin ( Theme, "windeco" ); + mBorderLeft->SetSkin ( Theme, "winborderleft" ); + mBorderRight->SetSkin ( Theme, "winborderright" ); + mBorderBottom->SetSkin ( Theme, "winborderbottom" ); if ( NULL != mButtonClose ) { - mButtonClose->ForceThemeSkin( Theme, "winclose" ); + mButtonClose->SetSkin( Theme, "winclose" ); mButtonClose->Size( mButtonClose->GetSkinShapeSize() ); } if ( NULL != mButtonMaximize ) { - mButtonMaximize->ForceThemeSkin( Theme, "winmax" ); + mButtonMaximize->SetSkin( Theme, "winmax" ); mButtonMaximize->Size( mButtonMaximize->GetSkinShapeSize() ); } if ( NULL != mButtonMinimize ) { - mButtonMinimize->ForceThemeSkin( Theme, "winmin" ); + mButtonMinimize->SetSkin( Theme, "winmin" ); mButtonMinimize->Size( mButtonMinimize->GetSkinShapeSize() ); } diff --git a/src/ui/cuiwinmenu.cpp b/src/ui/cuiwinmenu.cpp index 7a0abbf1e..3b92f0f3d 100644 --- a/src/ui/cuiwinmenu.cpp +++ b/src/ui/cuiwinmenu.cpp @@ -57,7 +57,7 @@ void cUIWinMenu::AddMenuButton( const String& ButtonText, cUIPopUpMenu * Menu ) Button->Text( ButtonText ); Button->Visible( true ); Button->Enabled( true ); - Button->ForceThemeSkin( mSkinState->GetSkin()->Theme(), "winmenubutton" ); + Button->SetSkin( mSkinState->GetSkin()->Theme(), "winmenubutton" ); Menu->Visible( false ); Menu->Enabled( false ); @@ -73,7 +73,7 @@ void cUIWinMenu::SetTheme( cUITheme * Theme ) { cUIComplexControl::SetTheme( Theme, "winmenu" ); for ( WinMenuList::iterator it = mButtons.begin(); it != mButtons.end(); it++ ) { - it->first->ForceThemeSkin( Theme, "winmenubutton" ); + it->first->SetSkin( Theme, "winmenubutton" ); } if ( 0 == mMenuHeight && NULL != GetSkin() && NULL != GetSkin()->GetShape( cUISkinState::StateNormal ) ) { diff --git a/src/ui/tuiitemcontainer.hpp b/src/ui/tuiitemcontainer.hpp index 23fe1e5d8..215695ed5 100644 --- a/src/ui/tuiitemcontainer.hpp +++ b/src/ui/tuiitemcontainer.hpp @@ -64,7 +64,7 @@ cUIControl * tUIItemContainer::OverFind( const eeVector2f& Point ) { UpdateQuad(); if ( PointInsidePolygon2( mPoly, Point ) ) { - WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD_POS, 1 ); + WriteCtrlFlag( UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD, 1 ); for ( Uint32 i = LBParent->mVisibleFirst; i <= LBParent->mVisibleLast; i++ ) { if ( NULL != LBParent->mItems[i] ) { diff --git a/src/ui/uihelper.hpp b/src/ui/uihelper.hpp index a1b1d96a6..f380f1780 100644 --- a/src/ui/uihelper.hpp +++ b/src/ui/uihelper.hpp @@ -9,36 +9,21 @@ Uint32 EE_API HAlignGet( Uint32 Flags ); Uint32 EE_API VAlignGet( Uint32 Flags ); -enum UI_CONTROL_FLAGS_POS { - UI_CTRL_FLAG_CLOSE_POS = 0, - UI_CTRL_FLAG_CLOSE_FO_POS, - UI_CTRL_FLAG_ANIM_POS, - UI_CTRL_FLAG_MOUSEOVER_POS, - UI_CTRL_FLAG_HAS_FOCUS_POS, - UI_CTRL_FLAG_SELECTED_POS, - UI_CTRL_FLAG_DISABLE_CHECK_CLOSE_CHILDS_POS, - UI_CTRL_FLAG_DISABLE_FADE_OUT_POS, - UI_CTRL_FLAG_MOUSEOVER_ME_OR_CHILD_POS, - UI_CTRL_FLAG_DRAGGING_POS, - UI_CTRL_FLAG_DRAGABLE_POS, - UI_CTRL_FLAG_COMPLEX_POS, - UI_CTRL_FLAG_FREE_USE_POS = 31 -}; - enum UI_CONTROL_FLAGS_VALUES { - UI_CTRL_FLAG_CLOSE = (1<