Esempio n. 1
0
        public void Button_Clicked(XG_Control sender )
        {
            if (Firstime)
            {
                Selfdisplay = true;
                Firstime = false;
            }
            if (!Selfdisplay)
            {
                if (this.DisplayValue)
                {
                    this._Value = false;
                }
                else
                {
                    this._Value = true;
                }
            }
            else
             {
                 if (this._Value)
                {
                    this._Value = false;
                }
                else
                {
                    this._Value = true;
                }
            }

            if (sender != null)
            {
                if (sender.Enabled)
                {
                    this.NotifyClicked();
                }
            }
            else { this.NotifyClicked(); }
        }
Esempio n. 2
0
 public void Square_Clicked(XG_Control sender=null)
 {
     Set_Clicked( sender);
     Mod.polygons.CreateRectangle();
 }
Esempio n. 3
0
        void Scrollbar_ValueChanged(XG_Control sender)
        {
            XGVScrollbar scrollBar = sender as XGVScrollbar;
            if (scrollBar == null)
                return;

            float value = scrollBar.Value;
            TopItemIndex = (int)value;
        }
Esempio n. 4
0
 void Clear_Clicked(XG_Control sender)
 {
     Mod.polygons.Clear();
 }
Esempio n. 5
0
 void Set_Clicked(XG_Control sender)
 {
     Mod.stopVectoring = true;
 }
Esempio n. 6
0
 void Casa_Clicked(XG_Control sender)
 {
     Mod.polygons.CreateRectangle(Vector2.Zero, Vector2.Zero);
     Mod.polygons.casa();
 }
Esempio n. 7
0
 public void Fill_Clicked(XG_Control sender = null)
 {
     Mod.polygons.fill = Fill.Value;
     if (Mod.polygons.fill)
     {
         Mod.polygons.canfill = true;
         Mod.polygons.fillin(false);
     }
     else { Mod.polygons.activeFill.Clear(); }
 }
Esempio n. 8
0
 void unban_Clicked(XG_Control sender)
 {
     NetMessage.SendData(25, -1, -1, "/unban " + Mod.addquotes(Mod.SelectedPlayer.name) + " " + Region.Text);
 }
Esempio n. 9
0
 void Size_Clicked(XG_Control sender)
 {
     selSize = (int)Count.Value;
 }
Esempio n. 10
0
        void SetSpawn_Clicked(XG_Control sender)
        {
            if (SetSpawn.Value)
            {

                RemoveSpawn.Value = false;

            }
        }
Esempio n. 11
0
 void SendAllSpawns_Clicked(XG_Control sender)
 {
     sendnpcgroup();
 }
Esempio n. 12
0
 void RemoveAllSpawns_Clicked(XG_Control sender)
 {
     Mod.spawnText.Clear();
 }
Esempio n. 13
0
        void OnClick_Clicked(XG_Control sender)
        {
            if (OnClick.Value)
            {
                GodFinger.Value = false;

            }
        }
Esempio n. 14
0
        void Godfinger_Clicked(XG_Control sender)
        {
            if (GodFinger.Value)
            {

                OnClick.Value = false;
            }
        }
Esempio n. 15
0
 public void Triangle_Clicked(XG_Control sender = null)
 {
     Set_Clicked(sender);
     Mod.polygons.CreateTriangle(Vector2.Zero, Mod.polygons.radius);
 }
Esempio n. 16
0
 void generic_Clicked(XG_Control sender)
 {
     NetMessage.SendData(25, -1, -1, "/" + sender.Text);
 }
Esempio n. 17
0
        void name_Clicked(XG_Control sender)
        {
            if (Main.netMode == 1)
            {
                NetMessage.SendData(25, -1, -1, @"/region name");
                SendPackets.SendData(17, -1, -1, "", 0, Main.player[Main.myPlayer].position.X / 16, Main.player[Main.myPlayer].position.Y / 16);
                for (int i = 0; i < Main.chatLine.Length; i++)
                {
                    string[] words = Main.chatLine[i].text.Split(' ');
                    if (words.Length > 3)
                    {
                        if (words[0] == "Region")
                        {

                            if (words[1] == @"Name:")
                            {

                                RegionName = Mod.addquotes(words[2]);
                                break;
                            }
                        }
                    }
                }
                Region.Text = RegionName;
            }
        }
Esempio n. 18
0
 void itemGrabRange_Clicked(XG_Control sender)
 {
     PlayerReflect.itemGrabRange = (int)itemGrabRange.Value;
 }
Esempio n. 19
0
        public void Build_Clicked(XG_Control sender = null)
        {
            Mod.polygons.SetShape();

            if (this.tiles.Value || this.walls.Value || this.hollow.Value)
            {
                Mod.LastAction = Mod.Copythis();

                if (!this.hollow.Value)
                {
                    for (int g = 0; g < Mod.polygons.activeFill.Count; g++)
                    {
                        Mod.placetilesandwalls(Mod.polygons.activeFill[g].X, Mod.polygons.activeFill[g].Y, this.tiles.Value, this.walls.Value);

                    }

                }
                else
                {
                    for (int g = 0; g < Mod.polygons.activeFill.Count; g++)
                    {
                        Mod.placetilesandwalls(Mod.polygons.activeFill[g].X, Mod.polygons.activeFill[g].Y, false, this.walls.Value);

                    }

                }

            for (int g = 0; g < Mod.polygons.activeLine.Count; g++)
                {
                    Mod.placetilesandwalls(Mod.polygons.activeLine[g].X, Mod.polygons.activeLine[g].Y, this.tiles.Value, this.walls.Value);

                }

            }
        }
Esempio n. 20
0
 void itemGrabSpeed_Clicked(XG_Control sender)
 {
     PlayerReflect.itemGrabSpeed = itemGrabSpeed.Value;
 }
Esempio n. 21
0
        public void undoVert_Clicked(XG_Control sender = null)
        {
            if (Mod.polygons.verTices.Count > 0)
            {
                Mod.polygons.verTices.RemoveAt(Mod.polygons.verTices.Count - 1);
                Mod.polygons.cansetlines=true;
                Mod.polygons.setlines();
                Mod.polygons.canfill = true;
                Mod.polygons.fillin(false);

            }
        }
Esempio n. 22
0
 void Set_Clicked(XG_Control sender)
 {
     Mod.stopVectoring = true;
     Mod.polygons.cansetlines = false;
 }
Esempio n. 23
0
 void Clear_Clicked(XG_Control sender)
 {
     Mod.stopVectoring = false;
     Mod.polygons.verTices.Clear();
     Mod.polygons.activeFill.Clear();
     Mod.polygons.activeLine.Clear();
     Mod.tilecopies = new List<Tiles>();
 }
Esempio n. 24
0
 void Login_Clicked(XG_Control sender)
 {
     NetMessage.SendData(25, -1, -1, "/login " + user.Text + " " + pass.Text);
 }
Esempio n. 25
0
        void button(XG_Control sender)
        {
            if (sender == Build)
            {
                if (Build.Value)
                {
                    Destroy.Value = false;
                    Replace.Value = false;
                    All.Value = false;
                }
            }
            if (sender == Destroy)
            {
                if (Destroy.Value)
                {
                    Build.Value = false;
                    Replace.Value = false;
                }
            }
            if (sender == Replace)
            {
                if (Replace.Value)
                {
                    Build.Value = false;
                    Destroy.Value = false;
                }
            }
            if (sender == All)
            {
                if (All.Value)
                {
                    Build.Value = false;

                }
            }
        }
Esempio n. 26
0
        void time_Clicked(XG_Control sender)
        {
            timeindex++;
            if (timeindex > 5) { timeindex = 1; }
            string time = "day";
            if (timeindex == 2)
            {
                time = "night";
            }
            if (timeindex == 3)
            {
                time = "dusk";
            }
            if (timeindex == 4)
            {
                time = "noon";
            }
            if (timeindex == 5)
            {
                time = "midnight";
            }

            NetMessage.SendData(25, -1, -1, "/time " + time);
        }
Esempio n. 27
0
 void Set_Clicked(XG_Control sender)
 {
     Mod.polygons.SetShape();
 }
Esempio n. 28
0
 void kick_Clicked(XG_Control sender)
 {
     NetMessage.SendData(25, -1, -1, "/kick " + Mod.addquotes(Mod.SelectedPlayer.name) + " " + Reason.Text);
 }
Esempio n. 29
0
        public void Plus_Clicked(XG_Control sender = null)
        {
            if (!this.repeat)
            {
                if ((this.Max == 0 && this.Min == 0) || !(this._Value >= (this.Max - this.Step)) || this.Loop)
                {

                    if (sender != null)
                    {
                        if (sender.Enabled)
                        {
                            this._Value += this.Step;
                            this.NotifyClicked();
                        }
                    }
                    else
                    {
                        this._Value += this.Step;
                        this.NotifyClicked();
                    }
                }
            }
        }
Esempio n. 30
0
 void genericplayer_Clicked(XG_Control sender)
 {
     NetMessage.SendData(25, -1, -1, "/" + sender.Text + " " + Mod.SelectedPlayer.name);
 }