示例#1
0
 public GSlider(int SliderID, IHue Hue, int X, int Y, int Width, int Height, double Value, double Start, double End, double Increase)
     : base(X, Y)
 {
     this.m_vCache = new VertexCache();
     this.m_Width = Width;
     this.m_Height = Height;
     this.m_Start = Start;
     this.m_End = End;
     this.m_Increase = Increase;
     this.m_Gump = Hue.GetGump(SliderID);
     if ((this.m_Gump != null) && !this.m_Gump.IsEmpty())
     {
         this.m_HalfWidth = this.m_Gump.Width / 2;
         this.m_yOffset = (this.m_Height - this.m_Gump.Height) / 2;
         this.m_Draw = true;
     }
     this.SetValue(Value, false);
 }
示例#2
0
 public GDragable(int GumpID, IHue Hue, int X, int Y) : base(X, Y)
 {
     this.m_CanClose  = true;
     this.m_fAlpha    = 1f;
     this.m_vCache    = new VertexCache();
     this.m_GumpID    = GumpID;
     this.m_Hue       = Hue;
     base.m_CanDrag   = true;
     base.m_QuickDrag = true;
     this.m_Dockers   = new ArrayList();
     this.m_Linked    = new ArrayList();
     this.m_Gump      = Hue.GetGump(GumpID);
     if ((this.m_Gump != null) && !this.m_Gump.IsEmpty())
     {
         this.m_Width  = this.m_Gump.Width;
         this.m_Height = this.m_Gump.Height;
         this.m_Draw   = true;
     }
 }
示例#3
0
 public GDragable(int GumpID, IHue Hue, int X, int Y)
     : base(X, Y)
 {
     this.m_vCache    = new VertexCache();
     this.m_GumpID    = GumpID;
     this.m_Hue       = Hue;
     this.m_CanDrag   = true;
     this.m_QuickDrag = true;
     this.m_Dockers   = new ArrayList();
     this.m_Linked    = new ArrayList();
     this.m_Gump      = Hue.GetGump(GumpID);
     if (this.m_Gump == null || this.m_Gump.IsEmpty())
     {
         return;
     }
     this.m_Width  = this.m_Gump.Width;
     this.m_Height = this.m_Gump.Height;
     this.m_Draw   = true;
 }
示例#4
0
 public GDragable(int GumpID, IHue Hue, int X, int Y)
     : base(X, Y)
 {
     this.m_CanClose = true;
     this.m_fAlpha = 1f;
     this.m_vCache = new VertexCache();
     this.m_GumpID = GumpID;
     this.m_Hue = Hue;
     base.m_CanDrag = true;
     base.m_QuickDrag = true;
     this.m_Dockers = new ArrayList();
     this.m_Linked = new ArrayList();
     this.m_Gump = Hue.GetGump(GumpID);
     if ((this.m_Gump != null) && !this.m_Gump.IsEmpty())
     {
         this.m_Width = this.m_Gump.Width;
         this.m_Height = this.m_Gump.Height;
         this.m_Draw = true;
     }
 }
示例#5
0
        public GButton(int NormalID, int OverID, int PressedID, int X, int Y, OnClick ClickHandler)
            : base(X, Y)
        {
            this.m_GumpID    = new int[3];
            this.m_GumpID[0] = NormalID;
            this.m_GumpID[1] = OverID;
            this.m_GumpID[2] = PressedID;
            this.m_Gump      = new Texture[3];
            this.m_Draw      = new bool[3];
            IHue @default = Hues.Default;

            for (int index = 0; index < 3; ++index)
            {
                this.m_Gump[index] = @default.GetGump(this.m_GumpID[index]);
                this.m_Draw[index] = this.m_Gump[index] != null && !this.m_Gump[index].IsEmpty();
            }
            this.m_OnClick      = ClickHandler;
            this.Enabled        = this.m_OnClick != null;
            this.m_ITranslucent = true;
        }
示例#6
0
        public void SetGumpID(int NormalID, int OverID, int PressedID)
        {
            this.m_GumpID    = new int[3];
            this.m_GumpID[0] = NormalID;
            this.m_GumpID[1] = OverID;
            this.m_GumpID[2] = PressedID;
            this.m_Gump      = new Texture[3];
            this.m_Draw      = new bool[3];
            IHue @default = Hues.Default;

            for (int index = 0; index < 3; ++index)
            {
                this.m_Gump[index] = @default.GetGump(this.m_GumpID[index]);
                this.m_Draw[index] = this.m_Gump[index] != null && !this.m_Gump[index].IsEmpty();
            }
            if (this.m_vCache == null)
            {
                return;
            }
            this.m_vCache.Invalidate();
        }
示例#7
0
 public Texture ReadFromDisk(int ItemID, IHue Hue)
 {
     ItemID &= 0x3fff;
     if ((ItemID >= 0x3584) && (ItemID <= 0x35a1))
     {
         return Hue.GetGump(0x91b + (ItemID - 0x3584));
     }
     if (this.m_Factory == null)
     {
         this.m_Factory = new ItemFactory(this);
     }
     return this.m_Factory.Load(ItemID, Hue);
 }