Esempio n. 1
0
        public void NudFurniture_ValueChanged(object sender, EventArgs e)
        {
            if (E_Globals.Editorindex == 0 || E_Globals.Editorindex > Constants.MAX_ITEMS)
            {
                return;
            }

            Types.Item[E_Globals.Editorindex].Data2 = (int)nudFurniture.Value;

            if (E_Graphics.FurnitureGFXInfo[(int)nudFurniture.Value].IsLoaded == false)
            {
                E_Graphics.LoadTexture((int)nudFurniture.Value, (byte)10);
            }

            //seeying we still use it, lets update timer
            E_Graphics.FurnitureGFXInfo[(int)nudFurniture.Value].TextureTimer = System.Convert.ToInt32(System.Convert.ToInt32(ClientDataBase.GetTickCount()) + 100000);

            if (nudFurniture.Value > 0 && nudFurniture.Value <= E_Housing.NumFurniture)
            {
                Types.Item[E_Globals.Editorindex].FurnitureWidth  = System.Convert.ToInt32((double)E_Graphics.FurnitureGFXInfo[(int)nudFurniture.Value].width / 32);
                Types.Item[E_Globals.Editorindex].FurnitureHeight = System.Convert.ToInt32((double)E_Graphics.FurnitureGFXInfo[(int)nudFurniture.Value].height / 32);
                if (Types.Item[E_Globals.Editorindex].FurnitureHeight > 1)
                {
                    Types.Item[E_Globals.Editorindex].FurnitureHeight = Types.Item[E_Globals.Editorindex].FurnitureHeight - 1;
                }
            }
            else
            {
                Types.Item[E_Globals.Editorindex].FurnitureWidth  = 1;
                Types.Item[E_Globals.Editorindex].FurnitureHeight = 1;
            }

            E_Items.EditorItem_DrawFurniture();
        }
Esempio n. 2
0
 public void OptSetBlocks_CheckedChanged(object sender, EventArgs e)
 {
     if (E_Globals.Editorindex == 0 || E_Globals.Editorindex > Constants.MAX_ITEMS)
     {
         return;
     }
     if (optSetBlocks.Checked == true)
     {
         lblSetOption.Text = "Set Blocks: Os are passable and Xs are not. Simply place Xs where you do not want the player to walk.";
     }
     E_Items.EditorItem_DrawFurniture();
 }
Esempio n. 3
0
 public void OptSetFringe_CheckedChanged(object sender, EventArgs e)
 {
     if (E_Globals.Editorindex == 0 || E_Globals.Editorindex > Constants.MAX_ITEMS)
     {
         return;
     }
     if (optSetFringe.Checked == true)
     {
         lblSetOption.Text = "Set Fringe: Os are draw on the fringe layer (the player can walk behind).";
     }
     E_Items.EditorItem_DrawFurniture();
 }
Esempio n. 4
0
 public void OptNoFurnitureEditing_CheckedChanged(object sender, EventArgs e)
 {
     if (E_Globals.Editorindex == 0 || E_Globals.Editorindex > Constants.MAX_ITEMS)
     {
         return;
     }
     if (optNoFurnitureEditing.Checked == true)
     {
         lblSetOption.Text = "No Editing: Lets you look at the image without setting any options (blocks/fringes).";
     }
     E_Items.EditorItem_DrawFurniture();
 }
Esempio n. 5
0
        public void PicFurniture_MouseDown(object sender, MouseEventArgs e)
        {
            if (E_Globals.Editorindex == 0 || E_Globals.Editorindex > Constants.MAX_ITEMS)
            {
                return;
            }
            int X = 0;
            int Y = 0;

            X = System.Convert.ToInt32((double)e.X / 32);
            Y = System.Convert.ToInt32((double)e.Y / 32);

            if (X > 3)
            {
                return;
            }
            if (Y > 3)
            {
                return;
            }

            if (optSetBlocks.Checked == true)
            {
                if (Types.Item[E_Globals.Editorindex].FurnitureBlocks[X, Y] == 1)
                {
                    Types.Item[E_Globals.Editorindex].FurnitureBlocks[X, Y] = 0;
                }
                else
                {
                    Types.Item[E_Globals.Editorindex].FurnitureBlocks[X, Y] = 1;
                }
            }
            else if (optSetFringe.Checked == true)
            {
                if (Types.Item[E_Globals.Editorindex].FurnitureFringe[X, Y] == 1)
                {
                    Types.Item[E_Globals.Editorindex].FurnitureFringe[X, Y] = 0;
                }
                else
                {
                    Types.Item[E_Globals.Editorindex].FurnitureFringe[X, Y] = 1;
                }
            }
            E_Items.EditorItem_DrawFurniture();
        }