Пример #1
0
        public MSFake()
        {
            InitializeComponent();

            this.DoubleBuffered = true;

            // filename in case filename is added later on
            filename = "Untitled*";

            // ensure selection box doesn't get drawn on top of
            pic_selection.SendToBack();

            // initialize bools
            sel_mouse_down = false;
            mouse_down = false;
            selected_box = false;
            show_toolbox = true;
            show_colors = true;

            // initialize various states
            _tool = TOOLS.Pencil;
            _curve_state = CURVESTATES.NoClick;
            _color = Color.Red;

            // set up font collection
            fonts = new List<string>();
            FontFamily[] fontList = new System.Drawing.Text.InstalledFontCollection().Families;
            foreach (FontFamily font in fontList)
                fonts.Add(font.Name);
            cmb_fonts.DataSource = fonts;

            // set up canvas to be drawn on
            canvas = new Bitmap(panel_canvas.Width, panel_canvas.Height);
        }
Пример #2
0
 public EntityStatHandler(List <Stat> statList)
 {
     StatList = TOOLS.CloneObject <List <Stat> >(statList);
 }
Пример #3
0
 public void UpdateStats(EntityStatHandler source)
 {
     playerStats = TOOLS.CloneObject <List <Stat> >(source.StatList);
 }
Пример #4
0
 public void UpdateInventory(WereAllGonnaDieAnywayNew.InventorySystem.Inventory source)
 {
     playerInventory = TOOLS.CloneObject <List <ItemFactoryData> >(source.ItemsInBag);
 }
Пример #5
0
 private void btn_text_Click(object sender, EventArgs e)
 {
     // switch to text tool
     updn_brush_size.Enabled = false;
     EnableAllButtons();
     btn_text.Enabled = false;
     _tool = TOOLS.Text;
     status_bar.Text = "Switched to Text tool.";
 }
Пример #6
0
 private void btn_rect_Click(object sender, EventArgs e)
 {
     // switch to rectangle tool
     updn_brush_size.Enabled = true;
     EnableAllButtons();
     btn_rect.Enabled = false;
     _tool = TOOLS.Rectangle;
     status_bar.Text = "Switched to Rectangle tool.";
 }
Пример #7
0
 private void btn_polygon_Click(object sender, EventArgs e)
 {
     // switch to polygon tool
     updn_brush_size.Enabled = false;
     EnableAllButtons();
     btn_polygon.Enabled = false;
     _tool = TOOLS.Polygon;
     status_bar.Text = "Switched to Polygon tool.";
 }
Пример #8
0
 private void btn_erase_Click(object sender, EventArgs e)
 {
     // switch to eraser tool
     updn_brush_size.Enabled = true;
     EnableAllButtons();
     btn_erase.Enabled = false;
     _tool = TOOLS.Erase;
     status_bar.Text = "Switched to Erase tool.";
 }
Пример #9
0
 private void btn_curve_Click(object sender, EventArgs e)
 {
     // switch to bezier curve tool
     updn_brush_size.Enabled = false;
     EnableAllButtons();
     btn_curve.Enabled = false;
     _tool = TOOLS.Curve;
     status_bar.Text = "Switched to Curve tool.";
 }