コード例 #1
0
ファイル: MessageHandler.cs プロジェクト: alanr74/gamecode3
 // We take both the EngineDisplayForm's handle and its displayPanel handle, since messages
 // will sometimes be for the form, or the display panel.
 public MessageHandler( IntPtr formHandle, IntPtr displayPanelHandle, EngineDisplayForm parent )
 {
     m_formHandle = formHandle;
     m_displayPanelHandle = displayPanelHandle;
     m_parent = parent;
     m_gameIsRunning = false;
 }
コード例 #2
0
        public ActorPropertiesForm( EngineDisplayForm parent )
        {
            InitializeComponent();
            m_parent = parent;
            m_types = new ArrayList();
            m_types.Add("Unknown");
            m_types.Add("Sphere");
            m_types.Add("Teapot");
            m_types.Add("AiTeapot");
            m_types.Add("Test Object");
            m_types.Add("Grid");
            m_types.Add("Generic Mesh Object");

            m_createForm = new ActorCreationForm();

            m_mainNode = new TreeNode();
            m_mainNode.Name = "mainNode";
            m_mainNode.Text = "Scene";
            this.m_treeView.Nodes.Add(m_mainNode);

            // Make sure nothing that can change the scene
            // is active until the Editor itself has been
            // initialized
            m_fileToolStripMenuItem.Enabled = false;
            m_addActorBtn.Enabled = false;
            m_removeActorBtn.Enabled = false;
            m_updateActorPosBtn.Enabled = false;
            m_restoreActorPosBtn.Enabled = false;
            m_rotateActorYAxisBtn.Enabled = false;
            m_rotateActorXAxisBtn.Enabled = false;
        }
        public ActorPropertiesForm(EngineDisplayForm parent)
        {
            InitializeComponent();
            m_parent = parent;
            m_types  = new ArrayList();
            m_types.Add("Unknown");
            m_types.Add("Sphere");
            m_types.Add("Teapot");
            m_types.Add("AiTeapot");
            m_types.Add("Test Object");
            m_types.Add("Grid");
            m_types.Add("Generic Mesh Object");

            m_createForm = new ActorCreationForm();

            m_mainNode      = new TreeNode();
            m_mainNode.Name = "mainNode";
            m_mainNode.Text = "Scene";
            this.m_treeView.Nodes.Add(m_mainNode);

            // Make sure nothing that can change the scene
            // is active until the Editor itself has been
            // initialized
            m_fileToolStripMenuItem.Enabled = false;
            m_addActorBtn.Enabled           = false;
            m_removeActorBtn.Enabled        = false;
            m_updateActorPosBtn.Enabled     = false;
            m_restoreActorPosBtn.Enabled    = false;
            m_rotateActorYAxisBtn.Enabled   = false;
            m_rotateActorXAxisBtn.Enabled   = false;
        }
コード例 #4
0
 // We take both the EngineDisplayForm's handle and its displayPanel handle, since messages
 // will sometimes be for the form, or the display panel.
 public MessageHandler(IntPtr formHandle, IntPtr displayPanelHandle, EngineDisplayForm parent)
 {
     m_formHandle         = formHandle;
     m_displayPanelHandle = displayPanelHandle;
     m_parent             = parent;
     m_gameIsRunning      = false;
 }
コード例 #5
0
ファイル: Program.cs プロジェクト: alanr74/gamecode3
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EngineDisplayForm form = new EngineDisplayForm();

            // Hook up our message handler
            MessageHandler messageHandler = form.GetMessageHandler();
            Application.AddMessageFilter(messageHandler);
            Application.Idle += new EventHandler(messageHandler.Application_Idle);
            Application.Run(form);
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: fengjixuchui/gamecode3
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            EngineDisplayForm form = new EngineDisplayForm();

            // Hook up our message handler
            MessageHandler messageHandler = form.GetMessageHandler();

            Application.AddMessageFilter(messageHandler);
            Application.Idle += new EventHandler(messageHandler.Application_Idle);
            Application.Run(form);
        }