Exemple #1
0
 // Token: 0x060015CD RID: 5581 RVA: 0x000830C6 File Offset: 0x000814C6
 public void shiftWindow(Sleek2Window window, int insertIndex)
 {
     this.windows.Remove(window);
     insertIndex = Mathf.Clamp(insertIndex, 0, this.windows.Count);
     this.windows.Insert(insertIndex, window);
     this.updateTabs(insertIndex);
 }
 // Token: 0x060015EF RID: 5615 RVA: 0x00083C69 File Offset: 0x00082069
 protected virtual void handleDockedWindowRemoved(Sleek2WindowDock dock, Sleek2Window window)
 {
     if (dock.windows.Count == 0)
     {
         this.triggerEmptied();
     }
 }
 // Token: 0x060015EB RID: 5611 RVA: 0x000836C8 File Offset: 0x00081AC8
 public virtual void write(IFormattedFileWriter writer)
 {
     writer.beginObject();
     if (this.dock == null)
     {
         writer.writeKey("Direction");
         writer.writeValue <Separator.EDirection>(this.separator.handle.direction);
         writer.writeKey("Split");
         writer.writeValue <float>(this.separator.handle.value);
         writer.writeKey("First");
         writer.writeValue <Sleek2WindowPartition>(this.a);
         writer.writeKey("Second");
         writer.writeValue <Sleek2WindowPartition>(this.b);
     }
     else
     {
         writer.writeKey("Windows");
         writer.beginArray();
         for (int i = 0; i < this.dock.windows.Count; i++)
         {
             Sleek2Window sleek2Window = this.dock.windows[i];
             writer.beginObject();
             writer.writeValue <Type>("Type", sleek2Window.GetType());
             writer.writeValue <Sleek2Window>("Window", sleek2Window);
             writer.endObject();
         }
         writer.endArray();
     }
     writer.endObject();
 }
Exemple #4
0
 // Token: 0x060015D7 RID: 5591 RVA: 0x000833D6 File Offset: 0x000817D6
 protected virtual void triggerDockedWindowRemoved(Sleek2Window window)
 {
     if (this.dockedWindowRemoved != null)
     {
         this.dockedWindowRemoved(this, window);
     }
 }
 // Token: 0x060015EC RID: 5612 RVA: 0x000837D4 File Offset: 0x00081BD4
 public bool addWindow(Sleek2Window window)
 {
     if (this.dock != null)
     {
         this.dock.addWindow(window);
         return(true);
     }
     return((this.a != null && this.a.addWindow(window)) || (this.b != null && this.b.addWindow(window)));
 }
Exemple #6
0
 // Token: 0x060015D3 RID: 5587 RVA: 0x000832BC File Offset: 0x000816BC
 protected virtual void handleActivityChanged(Sleek2Window window)
 {
     if (!window.isActive)
     {
         return;
     }
     for (int i = 0; i < this.windows.Count; i++)
     {
         this.windows[i].isActive = (this.windows[i] == window);
     }
 }
Exemple #7
0
 // Token: 0x060015D0 RID: 5584 RVA: 0x000831BC File Offset: 0x000815BC
 public void removeWindow(Sleek2Window window)
 {
     window.dock = null;
     this.panel.removeElement(window);
     this.dock.removeElement(window.tab);
     this.windows.Remove(window);
     window.tab.clicked     -= this.handleTabClicked;
     window.activityChanged -= this.handleActivityChanged;
     this.updateTabs(0);
     this.triggerDockedWindowRemoved(window);
 }
Exemple #8
0
 // Token: 0x060015CF RID: 5583 RVA: 0x00083124 File Offset: 0x00081524
 public void addWindow(Sleek2Window window, int insertIndex)
 {
     insertIndex = Mathf.Clamp(insertIndex, 0, this.windows.Count);
     window.dock = this;
     window.transform.reset();
     this.dock.addElement(window.tab);
     this.windows.Insert(insertIndex, window);
     this.panel.addElement(window);
     window.tab.clicked     += this.handleTabClicked;
     window.activityChanged += this.handleActivityChanged;
     this.updateTabs(insertIndex);
     this.triggerDockedWindowAdded(window);
 }
 // Token: 0x060015EA RID: 5610 RVA: 0x000835A8 File Offset: 0x000819A8
 public virtual void read(IFormattedFileReader reader)
 {
     reader = reader.readObject();
     if (reader.containsKey("Windows"))
     {
         reader.readKey("Windows");
         int num = reader.readArrayLength();
         for (int i = 0; i < num; i++)
         {
             reader.readArrayIndex(i);
             IFormattedFileReader formattedFileReader = reader.readObject();
             if (formattedFileReader != null)
             {
                 Type type = formattedFileReader.readValue <Type>("Type");
                 if (type != null)
                 {
                     Sleek2Window sleek2Window = Activator.CreateInstance(type) as Sleek2Window;
                     if (sleek2Window != null)
                     {
                         this.addWindow(sleek2Window);
                         formattedFileReader.readKey("Window");
                         sleek2Window.read(formattedFileReader);
                     }
                 }
             }
         }
     }
     else
     {
         reader.readKey("Direction");
         Separator.EDirection edirection = reader.readValue <Separator.EDirection>();
         reader.readKey("Split");
         float value = reader.readValue <float>();
         Sleek2WindowPartition sleek2WindowPartition;
         Sleek2WindowPartition sleek2WindowPartition2;
         this.split((edirection != Separator.EDirection.HORIZONTAL) ? ESleek2PartitionDirection.UP : ESleek2PartitionDirection.RIGHT, out sleek2WindowPartition, out sleek2WindowPartition2);
         this.separator.handle.value = value;
         reader.readKey("First");
         sleek2WindowPartition.read(reader);
         reader.readKey("Second");
         sleek2WindowPartition2.read(reader);
     }
 }
 public Sleek2WindowTab(Sleek2Window window)
 {
     this.window = window;
     base.name   = "Tab";
     base.imageComponent.sprite = Resources.Load <Sprite>("Sprites/UI/Tab");
     base.transform.anchorMin   = Vector2.zero;
     base.transform.anchorMax   = new Vector2(0f, 1f);
     base.transform.pivot       = new Vector2(0f, 0.5f);
     base.transform.sizeDelta   = new Vector2((float)Sleek2Config.tabWidth, 0f);
     this.label = new Sleek2TranslatedLabel();
     this.label.transform.anchorMin = Vector2.zero;
     this.label.transform.anchorMax = Vector2.one;
     this.label.transform.sizeDelta = Vector2.zero;
     this.addElement(this.label);
     this.dragable            = base.gameObject.AddComponent <DragableTab>();
     this.dragable.target     = base.transform;
     this.dragable.source     = this;
     this.dragable.popoutTab += this.handlePopoutTab;
     this.context             = base.gameObject.AddComponent <ContextDropdownButton>();
     this.context.element     = this;
     this.context.opened     += this.handleContextDropdownOpened;
 }
Exemple #11
0
        // Token: 0x060015CE RID: 5582 RVA: 0x00083100 File Offset: 0x00081500
        public void addWindow(Sleek2Window window)
        {
            int count = this.windows.Count;

            this.addWindow(window, count);
        }