Exemple #1
0
 public void Resize(System.Drawing.Size size)
 {
     if (_initialized)
     {
         EngineDll.ResizeBuffer(size.Width, size.Height);
     }
 }
Exemple #2
0
        private void menuFileCreateMap_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("You sure? You may lost all your progress", "Create new map", MessageBoxButtons.OKCancel);

            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                EngineDll.newMap();
            }
        }
Exemple #3
0
        private void CameraType_Click(object sender, EventArgs e)
        {
            int type_ = Convert.ToInt32(((ToolStripMenuItem)sender).Tag);

            EngineDll.SetCameraType(type_);
            foreach (ToolStripMenuItem ts in menuEditCamera.DropDownItems)
            {
                ts.Checked = false;
            }
            ((ToolStripMenuItem)sender).Checked = true;
        }
Exemple #4
0
 private void menuFileSaveMap_Click(object sender, EventArgs e)
 {
     if (sfdMap.ShowDialog() == DialogResult.OK)
     {
         try {
             if (sfdMap.FileName != null)
             {
                 EngineDll.SaveMap(sfdMap.FileName, sfdMap.FileName.Length);
             }
         }
         catch (Exception ex) {
             MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
         }
     }
 }
Exemple #5
0
 public void SetActive(bool set)
 {
     EngineDll.SetActive(set);
     _active = set;
 }
Exemple #6
0
 public void Update()
 {
     EngineDll.Update();
 }
Exemple #7
0
 public bool Initialize(IntPtr mainHandle, IntPtr renderHandle)
 {
     _initialized = EngineDll.Initialize(mainHandle, renderHandle);
     return(_initialized);
 }