Exemplo n.º 1
0
 public GameEditorForm()
 {
     InitializeComponent();
     Activated  += (object o, EventArgs e) => { editorFocused = true; };
     Deactivate += (object o, EventArgs e) => { editorFocused = false; };
     UpdateObjects();
     editorScene.MouseWheel += (object o, MouseEventArgs e) => { GameEditorScene.MouseWheel(e.Delta); };
     updateFormTimer.Tick   += (object o, EventArgs e) =>
     {
         if (editorScene.Focused)
         {
             ChooseObject(GameEditorScene.choosedIndex);
             UpdatePosition();
         }
         UpdateFps();
         if (needUpdateObjectComponents)
         {
             UpdateGameObjectComponentsList();
             labelText = "";
             needUpdateObjectComponents = false;
         }
         if (needInitScene)
         {
             GameEditorScene.Init(editorScene);
             needInitScene = false;
         }
     };
     UpdateComponentsList();
     needInitScene             = true;
     Core.GameEngine.gameState = Core.GameEngine.GameState.editorPause;
 }
Exemplo n.º 2
0
 private void editorScene_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         GameEditorScene.mouseDown = false;
     }
     GameEditorScene.MouseUp(e);
 }
Exemplo n.º 3
0
 private void editorScene_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         GameEditorScene.mouseDown = true;
     }
     editorScene.Select();
     editorScene.Focus();
     GameEditorScene.MouseDown(e);
 }
Exemplo n.º 4
0
 private void GameEditorForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     GameEditorScene.Stop();
 }
Exemplo n.º 5
0
 private void GameEditorForm_ResizeEnd(object sender, EventArgs e)
 {
     GameEditorScene.OnResizeEnd();
 }
Exemplo n.º 6
0
 private void editorScene_MouseMove(object sender, MouseEventArgs e)
 {
     GameEditorScene.MouseMove(e);
 }
Exemplo n.º 7
0
 private void splitContainer2_SplitterMoved(object sender, SplitterEventArgs e)
 {
     GameEditorScene.OnResizeEnd();
 }