コード例 #1
0
        public MiniMap()
        {
            clippingOptions = ClippingOptions.NoClipping;

            capabilities = Capabilities.Movable;

            m_Dragger = new Dragger {
                clampToParentEdges = true
            };
            this.AddManipulator(m_Dragger);

            anchored = false;

            maxWidth  = 200;
            maxHeight = 180;

            m_Label = new Label("Floating Minimap");

            Add(m_Label);

            RegisterCallback <MouseDownEvent>(OnMouseDown);
            m_Label.RegisterCallback <MouseDownEvent>(EatMouseDown);

            this.AddManipulator(new ContextualMenuManipulator(BuildContextualMenu));
            AddStyleSheetPath("StyleSheets/GraphView/Minimap.uss");
        }
コード例 #2
0
ファイル: MiniMap.cs プロジェクト: yaoya/UnityDecompiled
 public MiniMap()
 {
     base.clippingOptions = VisualElement.ClippingOptions.NoClipping;
     base.capabilities    = Capabilities.Movable;
     this.m_Dragger       = new Dragger
     {
         clampToParentEdges = true
     };
     this.AddManipulator(this.m_Dragger);
     this.anchored  = false;
     this.maxWidth  = 200f;
     this.maxHeight = 180f;
     this.m_Label   = new Label("Floating Minimap");
     base.Add(this.m_Label);
     base.RegisterCallback <MouseDownEvent>(new EventCallback <MouseDownEvent>(this.OnMouseDown), Capture.NoCapture);
     this.AddManipulator(new ContextualMenuManipulator(new Action <ContextualMenuPopulateEvent>(this.BuildContextualMenu)));
 }