Parcourir la source

Override DarkTabButton DragEnd

Chernyavsky Andrey il y a 2 ans
Parent
commit
d0a2b35622

+ 16 - 0
BeefLibs/Beefy2D/src/theme/dark/DarkTabbedView.bf

@@ -159,6 +159,22 @@ namespace Beefy.theme.dark
                         ((DarkTabbedView)mTabbedView).DrawDockPreview(g, this);
                         ((DarkTabbedView)mTabbedView).DrawDockPreview(g, this);
                 }
                 }
             }            
             }            
+
+			public override void DragEnd()
+			{
+				if (mIsRightTab == true)
+				{
+					mTextColor = Color.White;
+
+					DarkTabbedView darkTabbedView = mTabbedView as DarkTabbedView;
+					darkTabbedView.SetRightTab(null, false);
+					darkTabbedView.AddTab(this, darkTabbedView.GetInsertPositionFromCursor());
+
+					Activate();
+				}
+
+				base.DragEnd();
+			}
         }
         }
 
 
         public class DarkTabDock : ICustomDock
         public class DarkTabDock : ICustomDock

+ 2 - 2
BeefLibs/Beefy2D/src/widgets/TabbedView.bf

@@ -143,7 +143,7 @@ namespace Beefy.widgets
                 }            
                 }            
             }
             }
 
 
-            public void DragStart()            
+            public virtual void DragStart()            
             {                
             {                
                 mSrcDraggingWindow = mWidgetWindow;
                 mSrcDraggingWindow = mWidgetWindow;
 
 
@@ -157,7 +157,7 @@ namespace Beefy.widgets
                 }                
                 }                
             }
             }
 
 
-            public void DragEnd()
+            public virtual void DragEnd()
             {
             {
                 //mWidgetWindow.mMouseLeftWindowDelegate.Remove(scope => MouseLeftWindow, true);
                 //mWidgetWindow.mMouseLeftWindowDelegate.Remove(scope => MouseLeftWindow, true);
 				AdjustPinnedState();
 				AdjustPinnedState();