added exception catching for dataavailable

This commit is contained in:
princessbobsanta 2016-04-23 15:13:51 -10:00
commit 3d978cb5a2
9 changed files with 234 additions and 65 deletions

View File

@ -326,7 +326,7 @@
this.ModeControlTabs.Location = new System.Drawing.Point(3, 3);
this.ModeControlTabs.Name = "ModeControlTabs";
this.ModeControlTabs.SelectedIndex = 0;
this.ModeControlTabs.Size = new System.Drawing.Size(1152, 504);
this.ModeControlTabs.Size = new System.Drawing.Size(1152, 516);
this.ModeControlTabs.TabIndex = 2;
//
// ResourcesTab
@ -347,7 +347,7 @@
this.ResourcesTab.Location = new System.Drawing.Point(4, 22);
this.ResourcesTab.Name = "ResourcesTab";
this.ResourcesTab.Padding = new System.Windows.Forms.Padding(3);
this.ResourcesTab.Size = new System.Drawing.Size(1144, 478);
this.ResourcesTab.Size = new System.Drawing.Size(1144, 490);
this.ResourcesTab.TabIndex = 0;
this.ResourcesTab.Text = "Resources";
//
@ -355,7 +355,7 @@
//
this.txtResourceName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtResourceName.Location = new System.Drawing.Point(285, 422);
this.txtResourceName.Location = new System.Drawing.Point(285, 429);
this.txtResourceName.Name = "txtResourceName";
this.txtResourceName.Size = new System.Drawing.Size(533, 20);
this.txtResourceName.TabIndex = 10;
@ -363,7 +363,7 @@
// btnSetName
//
this.btnSetName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSetName.Location = new System.Drawing.Point(824, 420);
this.btnSetName.Location = new System.Drawing.Point(824, 427);
this.btnSetName.Name = "btnSetName";
this.btnSetName.Size = new System.Drawing.Size(75, 23);
this.btnSetName.TabIndex = 9;
@ -375,7 +375,7 @@
this.lblResName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblResName.AutoSize = true;
this.lblResName.ForeColor = System.Drawing.SystemColors.ControlLight;
this.lblResName.Location = new System.Drawing.Point(192, 425);
this.lblResName.Location = new System.Drawing.Point(192, 432);
this.lblResName.Name = "lblResName";
this.lblResName.Size = new System.Drawing.Size(87, 13);
this.lblResName.TabIndex = 8;
@ -412,7 +412,7 @@
this.pnlResourceProperties.Controls.Add(this.listFProperties);
this.pnlResourceProperties.Location = new System.Drawing.Point(905, 31);
this.pnlResourceProperties.Name = "pnlResourceProperties";
this.pnlResourceProperties.Size = new System.Drawing.Size(231, 412);
this.pnlResourceProperties.Size = new System.Drawing.Size(231, 419);
this.pnlResourceProperties.TabIndex = 5;
//
// listFPVals
@ -447,7 +447,7 @@
this.pnlResourcePreview.Controls.Add(this.picPreview);
this.pnlResourcePreview.Location = new System.Drawing.Point(192, 31);
this.pnlResourcePreview.Name = "pnlResourcePreview";
this.pnlResourcePreview.Size = new System.Drawing.Size(707, 383);
this.pnlResourcePreview.Size = new System.Drawing.Size(707, 390);
this.pnlResourcePreview.TabIndex = 4;
//
// picPreview
@ -473,7 +473,7 @@
// btnRemoveResource
//
this.btnRemoveResource.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnRemoveResource.Location = new System.Drawing.Point(99, 449);
this.btnRemoveResource.Location = new System.Drawing.Point(99, 456);
this.btnRemoveResource.Name = "btnRemoveResource";
this.btnRemoveResource.Size = new System.Drawing.Size(86, 23);
this.btnRemoveResource.TabIndex = 2;
@ -484,7 +484,7 @@
// btnAddResource
//
this.btnAddResource.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnAddResource.Location = new System.Drawing.Point(7, 449);
this.btnAddResource.Location = new System.Drawing.Point(7, 456);
this.btnAddResource.Name = "btnAddResource";
this.btnAddResource.Size = new System.Drawing.Size(86, 23);
this.btnAddResource.TabIndex = 1;
@ -520,7 +520,7 @@
this.ObjectCreatorTab.Location = new System.Drawing.Point(4, 22);
this.ObjectCreatorTab.Name = "ObjectCreatorTab";
this.ObjectCreatorTab.Padding = new System.Windows.Forms.Padding(3);
this.ObjectCreatorTab.Size = new System.Drawing.Size(1144, 478);
this.ObjectCreatorTab.Size = new System.Drawing.Size(1144, 490);
this.ObjectCreatorTab.TabIndex = 1;
this.ObjectCreatorTab.Text = "Object Creator";
//
@ -528,7 +528,7 @@
//
this.btnSaveObj.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveObj.BackColor = System.Drawing.Color.LimeGreen;
this.btnSaveObj.Location = new System.Drawing.Point(905, 447);
this.btnSaveObj.Location = new System.Drawing.Point(905, 454);
this.btnSaveObj.Name = "btnSaveObj";
this.btnSaveObj.Size = new System.Drawing.Size(231, 23);
this.btnSaveObj.TabIndex = 8;
@ -554,6 +554,7 @@
this.btnSetObjName.TabIndex = 12;
this.btnSetObjName.Text = "OK";
this.btnSetObjName.UseVisualStyleBackColor = true;
this.btnSetObjName.Click += new System.EventHandler(this.btnSetObjName_Click);
//
// lblObjectName
//
@ -574,13 +575,14 @@
this.gboxBehaviorCode.ForeColor = System.Drawing.SystemColors.ControlLight;
this.gboxBehaviorCode.Location = new System.Drawing.Point(191, 152);
this.gboxBehaviorCode.Name = "gboxBehaviorCode";
this.gboxBehaviorCode.Size = new System.Drawing.Size(708, 289);
this.gboxBehaviorCode.Size = new System.Drawing.Size(708, 296);
this.gboxBehaviorCode.TabIndex = 10;
this.gboxBehaviorCode.TabStop = false;
this.gboxBehaviorCode.Text = "Behavior Code:";
//
// txtObjectCode
//
this.txtObjectCode.AccessibleName = "CodeBox";
this.txtObjectCode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
@ -588,8 +590,9 @@
this.txtObjectCode.Multiline = true;
this.txtObjectCode.Name = "txtObjectCode";
this.txtObjectCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtObjectCode.Size = new System.Drawing.Size(692, 264);
this.txtObjectCode.Size = new System.Drawing.Size(692, 271);
this.txtObjectCode.TabIndex = 0;
this.txtObjectCode.TextChanged += new System.EventHandler(this.txtObjectCode_TextChanged);
//
// gboxSprite
//
@ -706,9 +709,9 @@
this.pnlObjectTools.Controls.Add(this.lblActions);
this.pnlObjectTools.Controls.Add(this.pnlActions);
this.pnlObjectTools.Controls.Add(this.pnlEvents);
this.pnlObjectTools.Location = new System.Drawing.Point(905, 29);
this.pnlObjectTools.Location = new System.Drawing.Point(901, 29);
this.pnlObjectTools.Name = "pnlObjectTools";
this.pnlObjectTools.Size = new System.Drawing.Size(231, 412);
this.pnlObjectTools.Size = new System.Drawing.Size(239, 419);
this.pnlObjectTools.TabIndex = 8;
//
// lblEvents
@ -751,7 +754,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnVariable.Location = new System.Drawing.Point(5, 209);
this.btnVariable.Name = "btnVariable";
this.btnVariable.Size = new System.Drawing.Size(108, 23);
this.btnVariable.Size = new System.Drawing.Size(23, 23);
this.btnVariable.TabIndex = 7;
this.btnVariable.Text = "Set Variable";
this.btnVariable.UseVisualStyleBackColor = true;
@ -762,7 +765,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnInstantiate.Location = new System.Drawing.Point(5, 6);
this.btnInstantiate.Name = "btnInstantiate";
this.btnInstantiate.Size = new System.Drawing.Size(108, 23);
this.btnInstantiate.Size = new System.Drawing.Size(180, 23);
this.btnInstantiate.TabIndex = 0;
this.btnInstantiate.Text = "Instantiate Object";
this.btnInstantiate.UseVisualStyleBackColor = true;
@ -773,7 +776,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnDestroy.Location = new System.Drawing.Point(5, 35);
this.btnDestroy.Name = "btnDestroy";
this.btnDestroy.Size = new System.Drawing.Size(108, 23);
this.btnDestroy.Size = new System.Drawing.Size(180, 23);
this.btnDestroy.TabIndex = 1;
this.btnDestroy.Text = "Destroy Object";
this.btnDestroy.UseVisualStyleBackColor = true;
@ -784,7 +787,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnChangeSprite.Location = new System.Drawing.Point(6, 180);
this.btnChangeSprite.Name = "btnChangeSprite";
this.btnChangeSprite.Size = new System.Drawing.Size(107, 23);
this.btnChangeSprite.Size = new System.Drawing.Size(22, 23);
this.btnChangeSprite.TabIndex = 6;
this.btnChangeSprite.Text = "Change Sprite";
this.btnChangeSprite.UseVisualStyleBackColor = true;
@ -795,7 +798,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnMove.Location = new System.Drawing.Point(6, 64);
this.btnMove.Name = "btnMove";
this.btnMove.Size = new System.Drawing.Size(107, 23);
this.btnMove.Size = new System.Drawing.Size(179, 23);
this.btnMove.TabIndex = 2;
this.btnMove.Text = "Move";
this.btnMove.UseVisualStyleBackColor = true;
@ -806,7 +809,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnScore.Location = new System.Drawing.Point(6, 93);
this.btnScore.Name = "btnScore";
this.btnScore.Size = new System.Drawing.Size(107, 23);
this.btnScore.Size = new System.Drawing.Size(179, 23);
this.btnScore.TabIndex = 3;
this.btnScore.Text = "Set Score";
this.btnScore.UseVisualStyleBackColor = true;
@ -817,7 +820,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnTimer.Location = new System.Drawing.Point(6, 151);
this.btnTimer.Name = "btnTimer";
this.btnTimer.Size = new System.Drawing.Size(107, 23);
this.btnTimer.Size = new System.Drawing.Size(179, 23);
this.btnTimer.TabIndex = 5;
this.btnTimer.Text = "Set Timer";
this.btnTimer.UseVisualStyleBackColor = true;
@ -828,7 +831,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnHealth.Location = new System.Drawing.Point(6, 122);
this.btnHealth.Name = "btnHealth";
this.btnHealth.Size = new System.Drawing.Size(107, 23);
this.btnHealth.Size = new System.Drawing.Size(179, 23);
this.btnHealth.TabIndex = 4;
this.btnHealth.Text = "Set Health";
this.btnHealth.UseVisualStyleBackColor = true;
@ -854,21 +857,23 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnAlarm.Location = new System.Drawing.Point(5, 174);
this.btnAlarm.Name = "btnAlarm";
this.btnAlarm.Size = new System.Drawing.Size(108, 23);
this.btnAlarm.Size = new System.Drawing.Size(23, 23);
this.btnAlarm.TabIndex = 3;
this.btnAlarm.Text = "Timer Alarm";
this.btnAlarm.UseVisualStyleBackColor = true;
//
// btnOnCreate
//
this.btnOnCreate.AccessibleName = "btnOnCreate";
this.btnOnCreate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnOnCreate.Location = new System.Drawing.Point(5, 3);
this.btnOnCreate.Name = "btnOnCreate";
this.btnOnCreate.Size = new System.Drawing.Size(108, 23);
this.btnOnCreate.Size = new System.Drawing.Size(180, 23);
this.btnOnCreate.TabIndex = 4;
this.btnOnCreate.Text = "On Create";
this.btnOnCreate.UseVisualStyleBackColor = true;
this.btnOnCreate.Click += new System.EventHandler(this.btnOnCreate_Click_1);
//
// btnTestVar
//
@ -876,7 +881,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnTestVar.Location = new System.Drawing.Point(5, 145);
this.btnTestVar.Name = "btnTestVar";
this.btnTestVar.Size = new System.Drawing.Size(109, 23);
this.btnTestVar.Size = new System.Drawing.Size(180, 23);
this.btnTestVar.TabIndex = 6;
this.btnTestVar.Text = "Test Variable";
this.btnTestVar.UseVisualStyleBackColor = true;
@ -887,10 +892,11 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnCollision.Location = new System.Drawing.Point(5, 87);
this.btnCollision.Name = "btnCollision";
this.btnCollision.Size = new System.Drawing.Size(108, 23);
this.btnCollision.Size = new System.Drawing.Size(180, 23);
this.btnCollision.TabIndex = 2;
this.btnCollision.Text = "On Collision";
this.btnCollision.UseVisualStyleBackColor = true;
this.btnCollision.Click += new System.EventHandler(this.btnCollision_Click);
//
// btnInput
//
@ -898,7 +904,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnInput.Location = new System.Drawing.Point(5, 116);
this.btnInput.Name = "btnInput";
this.btnInput.Size = new System.Drawing.Size(108, 23);
this.btnInput.Size = new System.Drawing.Size(180, 23);
this.btnInput.TabIndex = 1;
this.btnInput.Text = "Get Input";
this.btnInput.UseVisualStyleBackColor = true;
@ -909,10 +915,11 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnOnDestruct.Location = new System.Drawing.Point(5, 29);
this.btnOnDestruct.Name = "btnOnDestruct";
this.btnOnDestruct.Size = new System.Drawing.Size(109, 23);
this.btnOnDestruct.Size = new System.Drawing.Size(180, 23);
this.btnOnDestruct.TabIndex = 5;
this.btnOnDestruct.Text = "On Destruct";
this.btnOnDestruct.UseVisualStyleBackColor = true;
this.btnOnDestruct.Click += new System.EventHandler(this.btnOnDestruct_Click);
//
// btnOnStep
//
@ -920,10 +927,11 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.btnOnStep.Location = new System.Drawing.Point(5, 58);
this.btnOnStep.Name = "btnOnStep";
this.btnOnStep.Size = new System.Drawing.Size(109, 23);
this.btnOnStep.Size = new System.Drawing.Size(180, 23);
this.btnOnStep.TabIndex = 7;
this.btnOnStep.Text = "On Step";
this.btnOnStep.UseVisualStyleBackColor = true;
this.btnOnStep.Click += new System.EventHandler(this.btnOnStep_Click);
//
// lblObjects
//
@ -961,7 +969,7 @@
this.RoomEditorTab.Controls.Add(this.glRoomView);
this.RoomEditorTab.Location = new System.Drawing.Point(4, 22);
this.RoomEditorTab.Name = "RoomEditorTab";
this.RoomEditorTab.Size = new System.Drawing.Size(1144, 478);
this.RoomEditorTab.Size = new System.Drawing.Size(1144, 490);
this.RoomEditorTab.TabIndex = 2;
this.RoomEditorTab.Text = "Room Editor";
//
@ -969,7 +977,7 @@
//
this.btnSaveRoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveRoom.BackColor = System.Drawing.Color.LimeGreen;
this.btnSaveRoom.Location = new System.Drawing.Point(908, 450);
this.btnSaveRoom.Location = new System.Drawing.Point(908, 457);
this.btnSaveRoom.Name = "btnSaveRoom";
this.btnSaveRoom.Size = new System.Drawing.Size(231, 23);
this.btnSaveRoom.TabIndex = 12;
@ -989,7 +997,7 @@
// btnRemoveRoom
//
this.btnRemoveRoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnRemoveRoom.Location = new System.Drawing.Point(76, 446);
this.btnRemoveRoom.Location = new System.Drawing.Point(76, 453);
this.btnRemoveRoom.Name = "btnRemoveRoom";
this.btnRemoveRoom.Size = new System.Drawing.Size(64, 23);
this.btnRemoveRoom.TabIndex = 10;
@ -999,7 +1007,7 @@
// btnAddRoom
//
this.btnAddRoom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnAddRoom.Location = new System.Drawing.Point(6, 446);
this.btnAddRoom.Location = new System.Drawing.Point(6, 453);
this.btnAddRoom.Name = "btnAddRoom";
this.btnAddRoom.Size = new System.Drawing.Size(64, 23);
this.btnAddRoom.TabIndex = 9;
@ -1029,7 +1037,7 @@
this.tabsRoomDesigner.Multiline = true;
this.tabsRoomDesigner.Name = "tabsRoomDesigner";
this.tabsRoomDesigner.SelectedIndex = 0;
this.tabsRoomDesigner.Size = new System.Drawing.Size(278, 441);
this.tabsRoomDesigner.Size = new System.Drawing.Size(278, 448);
this.tabsRoomDesigner.TabIndex = 1;
//
// tabObjects
@ -1048,14 +1056,14 @@
this.tabObjects.Location = new System.Drawing.Point(4, 4);
this.tabObjects.Name = "tabObjects";
this.tabObjects.Padding = new System.Windows.Forms.Padding(3);
this.tabObjects.Size = new System.Drawing.Size(270, 415);
this.tabObjects.Size = new System.Drawing.Size(270, 422);
this.tabObjects.TabIndex = 0;
this.tabObjects.Text = "Objects";
//
// txtLayer
//
this.txtLayer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtLayer.Location = new System.Drawing.Point(48, 390);
this.txtLayer.Location = new System.Drawing.Point(48, 397);
this.txtLayer.Name = "txtLayer";
this.txtLayer.Size = new System.Drawing.Size(55, 20);
this.txtLayer.TabIndex = 8;
@ -1065,7 +1073,7 @@
//
this.lblLayer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblLayer.AutoSize = true;
this.lblLayer.Location = new System.Drawing.Point(6, 393);
this.lblLayer.Location = new System.Drawing.Point(6, 400);
this.lblLayer.Name = "lblLayer";
this.lblLayer.Size = new System.Drawing.Size(36, 13);
this.lblLayer.TabIndex = 7;
@ -1076,7 +1084,7 @@
this.checkBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBox2.AutoSize = true;
this.checkBox2.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.checkBox2.Location = new System.Drawing.Point(109, 366);
this.checkBox2.Location = new System.Drawing.Point(109, 373);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(99, 17);
this.checkBox2.TabIndex = 6;
@ -1088,7 +1096,7 @@
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBox1.AutoSize = true;
this.checkBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.checkBox1.Location = new System.Drawing.Point(109, 340);
this.checkBox1.Location = new System.Drawing.Point(109, 347);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(78, 17);
this.checkBox1.TabIndex = 5;
@ -1098,7 +1106,7 @@
// txtYPos
//
this.txtYPos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtYPos.Location = new System.Drawing.Point(48, 364);
this.txtYPos.Location = new System.Drawing.Point(48, 371);
this.txtYPos.Name = "txtYPos";
this.txtYPos.Size = new System.Drawing.Size(55, 20);
this.txtYPos.TabIndex = 4;
@ -1108,7 +1116,7 @@
//
this.lblYPos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblYPos.AutoSize = true;
this.lblYPos.Location = new System.Drawing.Point(6, 367);
this.lblYPos.Location = new System.Drawing.Point(6, 374);
this.lblYPos.Name = "lblYPos";
this.lblYPos.Size = new System.Drawing.Size(35, 13);
this.lblYPos.TabIndex = 3;
@ -1117,7 +1125,7 @@
// txtXPos
//
this.txtXPos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtXPos.Location = new System.Drawing.Point(48, 338);
this.txtXPos.Location = new System.Drawing.Point(48, 345);
this.txtXPos.Name = "txtXPos";
this.txtXPos.Size = new System.Drawing.Size(55, 20);
this.txtXPos.TabIndex = 2;
@ -1127,7 +1135,7 @@
//
this.lblXPos.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblXPos.AutoSize = true;
this.lblXPos.Location = new System.Drawing.Point(6, 341);
this.lblXPos.Location = new System.Drawing.Point(6, 348);
this.lblXPos.Name = "lblXPos";
this.lblXPos.Size = new System.Drawing.Size(35, 13);
this.lblXPos.TabIndex = 1;
@ -1135,6 +1143,7 @@
//
// listObjChoices
//
this.listObjChoices.AllowDrop = true;
this.listObjChoices.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
@ -1144,6 +1153,7 @@
this.listObjChoices.Name = "listObjChoices";
this.listObjChoices.Size = new System.Drawing.Size(257, 316);
this.listObjChoices.TabIndex = 0;
this.listObjChoices.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listObjChoices_MouseDown);
//
// tabRoomProperties
//
@ -1173,7 +1183,7 @@
this.tabRoomProperties.Location = new System.Drawing.Point(4, 4);
this.tabRoomProperties.Name = "tabRoomProperties";
this.tabRoomProperties.Padding = new System.Windows.Forms.Padding(3);
this.tabRoomProperties.Size = new System.Drawing.Size(270, 415);
this.tabRoomProperties.Size = new System.Drawing.Size(270, 422);
this.tabRoomProperties.TabIndex = 1;
this.tabRoomProperties.Text = "Room Properties";
//
@ -1214,7 +1224,7 @@
this.txtRoomCode.Location = new System.Drawing.Point(10, 244);
this.txtRoomCode.Multiline = true;
this.txtRoomCode.Name = "txtRoomCode";
this.txtRoomCode.Size = new System.Drawing.Size(254, 163);
this.txtRoomCode.Size = new System.Drawing.Size(254, 170);
this.txtRoomCode.TabIndex = 17;
//
// lblImageEffects
@ -1397,7 +1407,7 @@
this.tabBackground.Location = new System.Drawing.Point(4, 4);
this.tabBackground.Name = "tabBackground";
this.tabBackground.Padding = new System.Windows.Forms.Padding(3);
this.tabBackground.Size = new System.Drawing.Size(270, 415);
this.tabBackground.Size = new System.Drawing.Size(270, 422);
this.tabBackground.TabIndex = 2;
this.tabBackground.Text = "Background";
//
@ -1408,7 +1418,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.listTiles.Location = new System.Drawing.Point(10, 121);
this.listTiles.Name = "listTiles";
this.listTiles.Size = new System.Drawing.Size(254, 287);
this.listTiles.Size = new System.Drawing.Size(254, 294);
this.listTiles.TabIndex = 6;
this.listTiles.UseCompatibleStateImageBehavior = false;
//
@ -1476,6 +1486,7 @@
//
// glRoomView
//
this.glRoomView.AllowDrop = true;
this.glRoomView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
@ -1483,9 +1494,13 @@
this.glRoomView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.glRoomView.Location = new System.Drawing.Point(430, 28);
this.glRoomView.Name = "glRoomView";
this.glRoomView.Size = new System.Drawing.Size(709, 419);
this.glRoomView.Size = new System.Drawing.Size(709, 426);
this.glRoomView.TabIndex = 0;
this.glRoomView.VSync = false;
this.glRoomView.Load += new System.EventHandler(this.glRoomView_Load);
this.glRoomView.DragDrop += new System.Windows.Forms.DragEventHandler(this.glRoomView_DragDrop);
this.glRoomView.DragEnter += new System.Windows.Forms.DragEventHandler(this.glRoomView_DragEnter);
this.glRoomView.Paint += new System.Windows.Forms.PaintEventHandler(this.glRoomView_Paint);
//
// imageResources
//
@ -1519,14 +1534,14 @@
this.splitChatSplit.Panel2.Controls.Add(this.txtChat);
this.splitChatSplit.Panel2MinSize = 36;
this.splitChatSplit.Size = new System.Drawing.Size(1160, 714);
this.splitChatSplit.SplitterDistance = 512;
this.splitChatSplit.SplitterDistance = 516;
this.splitChatSplit.SplitterWidth = 8;
this.splitChatSplit.TabIndex = 3;
//
// btnSendMsg
//
this.btnSendMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSendMsg.Location = new System.Drawing.Point(1016, 93);
this.btnSendMsg.Location = new System.Drawing.Point(1016, 158);
this.btnSendMsg.Name = "btnSendMsg";
this.btnSendMsg.Size = new System.Drawing.Size(139, 23);
this.btnSendMsg.TabIndex = 2;
@ -1537,7 +1552,7 @@
//
this.txtMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtMessage.Location = new System.Drawing.Point(3, 93);
this.txtMessage.Location = new System.Drawing.Point(3, 161);
this.txtMessage.Name = "txtMessage";
this.txtMessage.Size = new System.Drawing.Size(1006, 20);
this.txtMessage.TabIndex = 1;
@ -1552,7 +1567,7 @@
this.txtChat.Name = "txtChat";
this.txtChat.ReadOnly = true;
this.txtChat.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtChat.Size = new System.Drawing.Size(1152, 84);
this.txtChat.Size = new System.Drawing.Size(1152, 149);
this.txtChat.TabIndex = 0;
//
// folderPrjDir

View File

@ -12,6 +12,7 @@ using Microsoft.VisualBasic;
using System.IO;
using OpenTK;
using System.Text.RegularExpressions;
using OpenTK.Graphics.OpenGL;
namespace GameCreatorGroupProject
{
@ -25,6 +26,10 @@ namespace GameCreatorGroupProject
// Necessary to ensure the user doesn't load something nonexistent
// or exit without saving a brand new project.
bool projectOpen = false;
bool started = false;
// Bool to tell whether the Form has loaded yet, after which point we can start making OpenGL calls
bool formLoaded = false;
// Debug flag; used to bypass some checks or show extra information
#if DEBUG
@ -426,6 +431,9 @@ namespace GameCreatorGroupProject
cmbSprite.Text = "Please load a resource to select sprite.";
initcmb = true;
// OK to use OpenGL now
formLoaded = true;
}
@ -726,8 +734,7 @@ namespace GameCreatorGroupProject
}
}
private void btnSaveObj_Click(object sender, EventArgs e)
{
@ -798,17 +805,17 @@ namespace GameCreatorGroupProject
if (!txtObjectCode.Text.Equals(""))
{
string file1 = project.getResourceDir() + @"\" + txtObjectName.Text + ".goc";
/*
if (File.Exists(file1))
// Write the contents of the txtObjectCode to the file.
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("}");
using (BinaryWriter write = new BinaryWriter(File.Open(file1, FileMode.Create)))
{
int i = 0;
while (File.Exists(file1 + i.ToString()))
{
i++;
}
file1 = file1 + i.ToString();
write.Write(txtObjectName.Text);
write.Write(sprp);
}
*/
resImporter.SaveResource(project, txtObjectName.Text, ".goc", project.getResourceDir());
if (!listObjects.Items.Contains(txtObjectName.Text + ".goc"))
{
@ -897,5 +904,133 @@ namespace GameCreatorGroupProject
{
}
private void startercode() {
if (!started) {
started = true;
txtObjectCode.AppendText("class " + txtObjectName.Text + " : GameObject //as of now requires manually enter a closing brace");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("public "+ txtObjectName.Text + "(String name, Vector2 referenceCoord, Vector2[] vertexOffsets, float[] inputmap, float ispeed, float acceleration, bool collision):base(name,referenceCoord,vertexOffsets,inputmap,ispeed,acceleration,collision)");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("{");
txtObjectCode.AppendText(Environment.NewLine);
}
}
private void btnOnCreate_Click_1(object sender, EventArgs e)
{
Button clickedButton = (Button)sender;
// this next line will disable the user from generating the frame code twice. Maybe want to allow though, if they erase it or mess it up.
clickedButton.Enabled = false;
startercode();
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("public override bool spawn(Vector2[] spawnCoords)");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("{");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("}");
}
private void btnOnDestruct_Click(object sender, EventArgs e)
{
Button clickedButton = (Button)sender;
clickedButton.Enabled = false;
startercode();
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("~"+ txtObjectName.Text + "()");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("{");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("}");
}
private void btnCollision_Click(object sender, EventArgs e)
{
Button clickedButton = (Button)sender;
clickedButton.Enabled = false;
startercode();
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("public void collisionsetting()// uncomment the collision setting you desire");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("{");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("//setcollision();");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("//removecollision()");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("}");
}
//related to update()
private void btnOnStep_Click(object sender, EventArgs e)
{
Button clickedButton = (Button)sender;
clickedButton.Enabled = false;
startercode();
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("public override update()");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("{");
txtObjectCode.AppendText(Environment.NewLine);
txtObjectCode.AppendText("}");
}
private void btnSetObjName_Click(object sender, EventArgs e)
{
//Try to get obj name here. not sure how to do that just yet.
}
private void txtObjectCode_TextChanged(object sender, EventArgs e)
{
}
private void glRoomView_Load(object sender, EventArgs e)
{
// Check that the control has loaded
if (!formLoaded)
return;
// Set a background color
GL.ClearColor(Color.Black);
// Set up a viewport
int w = glRoomView.Width;
int h = glRoomView.Height;
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
GL.Ortho(0, w, 0, h, -1, 1);
GL.Viewport(0, 0, w, h);
}
private void glRoomView_Paint(object sender, PaintEventArgs e)
{
// Check that the control has loaded
if (!formLoaded)
return;
// Clear previously drawn graphics
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
// Show the new graphics
glRoomView.SwapBuffers();
}
private void glRoomView_DragEnter(object sender, DragEventArgs e)
{
// Here is where we put in code to start displaying a sprite/gameObject dragged in from the list box
}
private void glRoomView_DragDrop(object sender, DragEventArgs e)
{
// This is where we will capture the data for the gameObject dropped into the form
// Function fires when user releases the mouse button after entering the control.
}
private void listObjChoices_MouseDown(object sender, MouseEventArgs e)
{
// Here we will gather the data we want to let the user drag and drop onto the GLControl
}
}
}

View File

@ -152,6 +152,6 @@
<value>670, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>71</value>
<value>25</value>
</metadata>
</root>

View File

@ -10,6 +10,9 @@ using OpenTK;
namespace GameCreatorGroupProject
{
class GameObject
{
//contains all gameObjects with collision detection on, might have to move to external class rather than static var in case user is working on more than one project

View File

@ -75,3 +75,19 @@ C:\Users\Jared\Documents\GitHub\modalot\GameCreatorGroupProject\GameCreatorGroup
C:\Users\Jared\Documents\GitHub\modalot\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.MainWindow.resources
C:\Users\Jared\Documents\GitHub\modalot\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.ChatWindow.resources
C:\Users\Jared\Documents\GitHub\modalot\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csproj.GenerateResource.Cache
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe.config
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.exe
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.pdb
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.pdb
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.Compatibility.dll
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.dll
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.GLControl.dll
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.pdb
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.xml
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.GLControl.xml
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csprojResolveAssemblyReference.cache
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.CollisionDesigner.resources
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.MainWindow.resources
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.ChatWindow.resources
C:\Users\justi_000\Source\Repos\CS-350-410-431-Group-Project\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csproj.GenerateResource.Cache