コード例 #1
0
 // Token: 0x06002AC5 RID: 10949 RVA: 0x0009EBB4 File Offset: 0x0009CDB4
 protected virtual void OnBumperClick(global::RPOSBumper.Instance bumper)
 {
     if (!this.bumpersDisabled)
     {
         this.showWithRPOS = !this.showWithRPOS;
         if (this._showWithRPOS)
         {
             this.BringToFront();
         }
     }
 }
コード例 #2
0
 // Token: 0x06002A8E RID: 10894 RVA: 0x0009E79C File Offset: 0x0009C99C
 internal void RemoveBumper(global::RPOSBumper.Instance inst)
 {
     if (this.bumpers != null && this.bumpers.Remove(inst))
     {
         global::UIEventListener listener = inst.listener;
         if (listener)
         {
             global::UIEventListener uieventListener = listener;
             uieventListener.onClick = (global::UIEventListener.VoidDelegate)Delegate.Remove(uieventListener.onClick, this.buttonCallback);
         }
     }
 }
コード例 #3
0
    // Token: 0x060029FF RID: 10751 RVA: 0x0009B5FC File Offset: 0x000997FC
    public void Populate()
    {
        this.Clear();
        List <global::RPOSWindow> list = new List <global::RPOSWindow>(global::RPOS.GetBumperWindowList());
        int num = list.Count;

        for (int i = 0; i < num; i++)
        {
            if (list[i] && !string.IsNullOrEmpty(list[i].title))
            {
                list[i].EnsureAwake <global::RPOSWindow>();
            }
            else
            {
                list.RemoveAt(i--);
                num--;
            }
        }
        float num2 = 75f * this.buttonPrefab.gameObject.transform.localScale.x;
        float num3 = 5f;
        float num4 = (float)num * num2 * -0.5f;
        int   num5 = 0;

        if (this.instances == null)
        {
            this.instances = new HashSet <global::RPOSBumper.Instance>();
        }
        foreach (global::RPOSWindow rposwindow in list)
        {
            global::RPOSBumper.Instance instance = new global::RPOSBumper.Instance();
            instance.window = rposwindow;
            Vector3    localScale = this.buttonPrefab.gameObject.transform.localScale;
            GameObject gameObject = global::NGUITools.AddChild(base.gameObject, this.buttonPrefab.gameObject);
            instance.label      = gameObject.gameObject.GetComponentInChildren <global::UILabel>();
            instance.label.name = rposwindow.title + "BumperButton";
            Vector3 localPosition = gameObject.transform.localPosition;
            localPosition.x = num4 + (num2 + num3) * (float)num5;
            gameObject.transform.localPosition = localPosition;
            gameObject.transform.localScale    = localScale;
            instance.button = gameObject.GetComponentInChildren <global::UIButton>();
            instance.bumper = this;
            rposwindow.AddBumper(instance);
            this.instances.Add(instance);
            num5++;
        }
        Vector3 localScale2 = this.background.transform.localScale;

        localScale2.x = (float)num * num2 + ((float)num - 1f * num3);
        this.background.gameObject.transform.localScale    = localScale2;
        this.background.gameObject.transform.localPosition = new Vector3(localScale2.x * -0.5f, base.transform.localPosition.y, 0f);
    }
コード例 #4
0
    // Token: 0x06002A8D RID: 10893 RVA: 0x0009E72C File Offset: 0x0009C92C
    internal void AddBumper(global::RPOSBumper.Instance inst)
    {
        inst.label.text = this.title;
        global::UIEventListener listener = inst.listener;

        if (listener)
        {
            global::UIEventListener uieventListener = listener;
            uieventListener.onClick = (global::UIEventListener.VoidDelegate)Delegate.Combine(uieventListener.onClick, this.buttonCallback);
            if (this.bumpers == null)
            {
                this.bumpers = new List <global::RPOSBumper.Instance>();
            }
            this.bumpers.Add(inst);
        }
    }