Example #1
0
      public static void BeginEdit(fMap Owner, MapEngine.MapLabel label) {
         fEditLabel editor = new fEditLabel(Owner);
         editor.txtCaption.Text = label.Caption;
         editor.cmdLabelColor.BackColor = label.Color;

         if (editor.ShowDialog(Owner) == DialogResult.OK) {
            label.Caption = editor.txtCaption.Text;
            label.Color = editor.cmdLabelColor.BackColor;
            Owner.Engine.UpdateMap();
         }
      }
Example #2
0
        public static void BeginEdit(fMap Owner, MapEngine.MapLabel label)
        {
            fEditLabel editor = new fEditLabel(Owner);

            editor.txtCaption.Text         = label.Caption;
            editor.cmdLabelColor.BackColor = label.Color;

            if (editor.ShowDialog(Owner) == DialogResult.OK)
            {
                label.Caption = editor.txtCaption.Text;
                label.Color   = editor.cmdLabelColor.BackColor;
                Owner.Engine.UpdateMap();
            }
        }
Example #3
0
 public static void BeginAdd(fMap Owner) {
    fEditLabel editor = new fEditLabel(Owner);
    if (editor.ShowDialog(Owner) == DialogResult.OK) {
       MapEngine.MapLabel label = new MapEngine.MapLabel(editor.txtCaption.Text, editor.cmdLabelColor.BackColor);
       if (Owner.Engine.Game.Player != null) {
          label.setLocation(
             Owner.Engine.Game.Player.Location.X,
             Owner.Engine.Game.Player.Location.Y,
             Owner.Engine.Game.Player.Location.Z
          );
       }
       Owner.Engine.Data.AddLabel(label);
       Owner.Engine.UpdateMap();
    }
 }
Example #4
0
        public static void BeginAdd(fMap Owner)
        {
            fEditLabel editor = new fEditLabel(Owner);

            if (editor.ShowDialog(Owner) == DialogResult.OK)
            {
                MapEngine.MapLabel label = new MapEngine.MapLabel(editor.txtCaption.Text, editor.cmdLabelColor.BackColor);
                if (Owner.Engine.Game.Player != null)
                {
                    label.setLocation(
                        Owner.Engine.Game.Player.Location.X,
                        Owner.Engine.Game.Player.Location.Y,
                        Owner.Engine.Game.Player.Location.Z
                        );
                }
                Owner.Engine.Data.AddLabel(label);
                Owner.Engine.UpdateMap();
            }
        }