protected override bool OnButtonPressed(string name, Button button) { Parent.ObjectFactory.SetLetter(); Parent.ObjectFactory.Name = name; return true; }
public override void LoadContent() { //((ScreenWidth / 2) - 400) base.LoadContent(); myNewLevelPosition = (new Vector2(((ScreenWidth / 2) - 300), 0)); //descriptionBackgroundPosition = (new Vector2 (((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 100))) ; descriptionByTherapistPosition = (new Vector2(((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 100))) ; myDescriptionPosition = (new Vector2(((ScreenWidth / 2) - 300), ((ScreenHeight / 2) - 100))); //nameBackgroundPosition = (new Vector2(((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 40))); nameOfTherapistPosition = (new Vector2(((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 40))); myNamePosition = (new Vector2(((ScreenWidth / 2) - 300), ((ScreenHeight / 2) - 40))); font = Content.Load<SpriteFont>("font"); nameOfTherapist = ""; descriptionByTherapist = ""; textBackgorund = Content.Load<Texture2D>("GUI/textBackground"); myNewLevelTitle = Content.Load<Texture2D>("GUI/newLevel"); btnCancel = MakeButton(0, 0, "GUI/cancel"); btnCreate = MakeButton(((ScreenWidth) - 120), 0, "GUI/createButton"); btnHelp = MakeButton(((ScreenWidth) - 55), ScreenHeight - 55, "HELP/helpIcon"); delDesc = MakeButton(((ScreenWidth / 2) + 301), ((ScreenHeight / 2) - 107), "Gui/miniX"); delName = MakeButton(((ScreenWidth / 2) + 301), ((ScreenHeight / 2) - 47), "Gui/miniX"); myName = Content.Load<Texture2D>("GUI/name"); clearNameButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 40), "GUI/nothing"); myDescription = Content.Load<Texture2D>("GUI/description"); clearDescriptionButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 100), "GUI/nothingHighlight"); keyboard = new Keyboard(((ScreenWidth / 2) - 250), ((ScreenHeight) - 240), Content); keyboard.LoadContent(); }
private Color DoEvil(Button butt) { var fields = typeof(Button).GetFields( BindingFlags.NonPublic | BindingFlags.Instance); Texture2D tex = null; // must get icon field which was field 1 on my machine foreach (var info in fields) { if (info.FieldType == typeof(Texture2D)) { tex = (Texture2D)info.GetValue(butt); } } var centerPixel = new Color[1]; Debug.Assert(tex != null, "Could not get texture information."); tex.GetData<Color>( 0, // Interior rectangle with only one pixel. new Rectangle(2, 2, 1, 1), centerPixel, 0, 1); return centerPixel[0]; }
public override void LoadContent() { base.LoadContent(); searchQueryPosition = (new Vector2(((ScreenWidth / 2) - 275), 120)); magnifyGlassPosition = (new Vector2(((ScreenWidth / 2) - 300), 120)); listBackgroundPosition = (new Vector2( ((ScreenWidth / 2) - 300), 200)); //searchBackground = (new Vector2( ((screenWidth / 2) - 280), 200)); myLoadLevelTitlePosition = (new Vector2(((ScreenWidth / 2) - 300), 0)); //myCancelButtonPosition = (new Vector2(0, 0)); font = Content.Load<SpriteFont>("font"); searchQuery = ""; textBackgorund = Content.Load<Texture2D>("GUI/textBackground"); magnifyGlass = Content.Load<Texture2D>("GUI/magnifyGlass"); listBackground = Content.Load<Texture2D>("GUI/listBackground"); myLoadLevelTitle = Content.Load<Texture2D>("GUI/loadGameTitle"); btnHelp = MakeButton(((ScreenWidth) - 55), ScreenHeight - 55, "HELP/helpIcon"); btnCancel = MakeButton(0, 0, "GUI/cancel"); btnOpen = MakeButton(((ScreenWidth) - 120), 0, "GUI/openButton"); delSearch = MakeButton( ((ScreenWidth / 2) - 19), 113, "Gui/miniX"); goSearch = MakeButton( ((ScreenWidth / 2) + 40), 113, "Gui/go"); clearSearchButton = MakeButton( ((ScreenWidth / 2) - 275), 120, "GUI/nothing2"); keyboard = new Keyboard(((ScreenWidth / 2) - 250), ((ScreenHeight) - 240), Content); keyboard.LoadContent(); fileList = new List(levelNames.getFileNames(), 600, 15, 25, listBackgroundPosition, listBackground, font, Color.Black, Color.Yellow); // Load buttons 'n' stuff, yo! }
public override void LoadContent() { base.LoadContent(); _pauseMenuBackgroundPosition = (new Vector2(((ScreenWidth/2) - 100), ((ScreenHeight/2) - 175))); _pauseMenuGraphicPosition = (new Vector2(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 175))); _pauseMenuBackground = Content.Load<Texture2D>("LevelEditorMenu/menuBackground"); _pauseMenuTitle = Content.Load<Texture2D>("GamePauseMenu/pauseMenuGraphic"); _btnPauseContinue = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 20, "GamePauseMenu/continueButtonGraphic"); _btnPauseEdit = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 75, "GamePauseMenu/editButtonGraphic"); _btnPauseLoad = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 130, "GamePauseMenu/changeLevelButtonGraphic"); _btnPauseRestart = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 185, "GamePauseMenu/restartButtonGraphic"); // Load buttons 'n' stuff, yo! }
protected override bool OnButtonPressed(string name, Button button) { Parent.ObjectFactory.SetSizeFromName(name); // Go to the next state. return true; }
protected override bool OnButtonPressed(string shapeName, Button button) { Parent.ObjectFactory.SetShape(); Parent.ObjectFactory.Name = shapeName; // Go to the next state. return true; }
// What happens when a Color gets clicked on. protected override bool OnButtonPressed(string name, Button button) { // WARNING: Don't look at the implementation of DoEvil. // Just replace it. var color = DoEvil(button); Parent.ObjectFactory.Color = color; // Go to the next state. return true; }
public override void LoadContent() { base.LoadContent(); myTitlePosition = new Vector2(((ScreenWidth / 2) - 400), 0); btnNew = MakeButton(((ScreenWidth/2)-300), ((ScreenHeight/3)), "GUI/newButton"); btnLoad = MakeButton(((ScreenWidth / 2) - 300), ((ScreenHeight / 3)+150), "GUI/loadButton"); btnExit = MakeButton(((ScreenWidth / 2) - 300), ((ScreenHeight / 3)+300), "GUI/exitButton"); btnHelp = MakeButton(((ScreenWidth) - 55), ScreenHeight-55, "HELP/helpIcon"); myTitle = Content.Load<Texture2D>("GUI/targetTappingGame"); System.Diagnostics.Debug.WriteLine(((ScreenWidth / 2) - 300)); }
public override void LoadContent() { base.LoadContent(); answerPosition = (new Vector2(((ScreenWidth / 2) - 398), 112)); btnCancel = MakeButton(0, 0, "GUI/cancel"); cancelAndCreateHelp = MakeButton(0, 120, "HELP/cancelAndCreateHelp"); descriptionAndNameHelp = MakeButton(0, 170, "HELP/descriptionAndNameHelp"); xHelp = MakeButton(0, 220, "HELP/littleXHelp"); keyboardHelp = MakeButton(0, 270, "HELP/keyboardHelp"); answerBackDrop = Content.Load<Texture2D>("HELP/answerBackDrop"); answerBackDropPosition = (new Vector2(((ScreenWidth / 2) - 400), 110)); title = Content.Load<Texture2D>("HELP/title"); titlePosition = (new Vector2(((ScreenWidth / 2) - 150), 0)); font = Content.Load<SpriteFont>("font"); ///////////////////////////////////////////////////////////////////////////// cancelAndCreateHelpAnswer = "Cancel: This button will bring you back to the previous screen.\n"+ "Create: This button will advance you to the environment editing screen.\n"+ "Note, in order to create a level, the name and description must be 3 or\n"+ "more characters."; descriptionAndNameHelpAnswer = "Description and Name are input fields to guide you towards a consistent\n"+ "naming convention. In order to find previously loaded environments quickly\n"+ "and without frustration, it is important to consistently name your\n" + "environments. Following this naming convention will ensure this.\n"+ "In the description field you should describe the environment you intend to\n"+ "create very briefly, such as '40_Blue_Squares' or 'full_multi'\n"+ "The name field can contain either your name as the therapist, or the\n" + "patient's name who this environment is intended for, like Joe.\n"+ "The environment will then be saved in a file named along the lines of\n"+ " 'Joe_40_Blue_Squares'. \n"; xHelpAnswer = "The little ' X ' located next to the textboxes will delete the textbox's\n" + "content completely. This is a great way to start clean, rather than\n" + "having to backspace 15 times.\n"; keyboardHelpAnswer = "The keyboard is simple for two reasons. First this game does not require\n"+ "alot of text input. Second in order to more strictly enforce naming \n"+ "conventions we have limited the amount of characters you may use in naming.\n"+ "Hopefully you will find it easier to remember what you have named your files\n"+ "when you don't have to remember if you used upper/lower case, or if you\n"+ "spelt out the number two, or used the number sign, 2.\n"+ "\nWhy is there no space bar? We used underscores instead of whitespace as it\n"+ "makes for cleaner, more structured looking file names."; // Load buttons 'n' stuff, yo! }
public override void LoadContent() { base.LoadContent(); /* Load all of the graphics. */ _backgroundPosition = (new Vector2(((ScreenWidth/2) - 100), ((ScreenHeight/2) - 175))); _background = Content.Load<Texture2D>("GamePauseMenu/pauseMenuGraphic"); _btnPlayAgain = MakeButton(0, 0, "herp/derp"); _btnEditLevel = MakeButton(0, 0, "Herp/Derp"); _btnLoadLevel = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 130, "GamePauseMenu/changeLevelButtonGraphic"); _btnQuit = MakeButton(((ScreenWidth/2) - 60), ((ScreenHeight/2) - 150) + 185, "GamePauseMenu/restartButtonGraphic"); }
public override void LoadContent() { //((screenWidth / 2) - 400) base.LoadContent(); savedPopUpPosition = (new Vector2(((ScreenWidth / 2) - 100), ((ScreenHeight / 2) + 175))); levelEditorMenuPosition = (new Vector2( ((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 175) ) ); levelEditorMenuGraphicPosition = (new Vector2(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 175) ) ); levelEditorMenuBackground = Content.Load<Texture2D>("LevelEditorMenu/menuBackground"); levelEditorMenuTitle = Content.Load<Texture2D>("LevelEditorMenu/levelEditorMenuGraphic"); savedPopUp = Content.Load<Texture2D>("LevelEditorMenu/saveSuccessful"); btnLemBack = MakeButton(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 150)+20, "LevelEditorMenu/backButtonGraphic"); btnLemSave = MakeButton(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 150) + 75, "LevelEditorMenu/saveButtonGraphic"); btnLemLoad = MakeButton(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 150) + 130, "LevelEditorMenu/loadButtonGraphic"); btnLemClear = MakeButton(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 150) + 185, "LevelEditorMenu/clearButtonGraphic"); btnLemExit = MakeButton(((ScreenWidth / 2) - 60), ((ScreenHeight / 2) - 150) + 240, "LevelEditorMenu/exitButtonGraphic"); // Load buttons 'n' stuff, yo! }
public override void LoadContent() { base.LoadContent(); answerPosition = (new Vector2(((ScreenWidth / 2) - 398), 112)); btnCancel = MakeButton(0, 0, "GUI/cancel"); cancelOpenHelp = MakeButton(0, 120, "HELP/cancelAndOpenHelp"); searchHelp = MakeButton(0, 170, "HELP/searchHelp"); listHelp = MakeButton(0, 220, "HELP/listHelp"); keyboardHelp = MakeButton(0, 270, "HELP/searchKeyboardHelp"); answerBackDrop = Content.Load<Texture2D>("HELP/answerBackDrop"); answerBackDropPosition = (new Vector2(((ScreenWidth / 2) - 400), 110)); title = Content.Load<Texture2D>("HELP/title"); titlePosition = (new Vector2(((ScreenWidth / 2) - 150), 0)); font = Content.Load<SpriteFont>("font"); ///////////////////////////////////////////////////////////////////////////// cancelOpenHelpAnswer = "Cancel: Go to the previous screen.\n"+ "Open: Open the selected environment from the list inside the editor.\n"+ "Note: You must first select the environment you would like to load\n"+ "from the list before you can proceed to the editor.\n"; searchHelpAnswer = "Tap inside the textbox to open the keyboard, once the keyboard\n"+ "has appearded you can type in your search query. If you would like\n"+ "to clear your search query press the ' X ' next to the text box.\n"+ "Once you have typed in your search query press ' GO ' to search the "+ "list.\n"; listHelpAnswer = "The list shows all available saved environments. Once you have found\n"+ "the environment you would like to open, tap it to select it, then\n"+ "press the open button in the top right corner.\n"+ "All environments previosuly saved successfully will appear inside\n"+ "this list. If the list is to long you may want to search a \n"+ "environment in the search bar above the list.\n"; keyboardHelpAnswer = "The keyboard is not visible until you have tapped on the search.\n"+ "To open the keyboard simply tap inside the seach text box. From\n"+ "here you can type in your search query and press ' GO ' to search.\n"; // Load buttons 'n' stuff, yo! }
public override void LoadContent() { base.LoadContent(); btnTouchToStart = MakeButton(((ScreenWidth / 2) - 100), ((ScreenHeight / 2) - 100), "GameScreenContent/touchToStart"); youFinished = MakeButton(((ScreenWidth / 2) - 150), ((ScreenHeight / 2) - 100), "GameScreenContent/gameFinished"); btnPause = MakeButton(0, 0, "GUI/pauseButton"); //initialize the score score = 0; //load the spritefount to print the scroe to this.font = Content.Load<SpriteFont>("Font"); float scoreLength = (font.MeasureString("999/999")).X; //Load audio for button press song = Content.Load<Song>("ButtonPress"); //set the score fnal this.totalTimeAllowed = this.playingLevel.objectList.Count * this.playingLevel.upTime; //double check this position scorePosition = new Vector2(ScreenWidth - 240, 30); timePosition = new Vector2(ScreenWidth - 120, 30); }
// What happens when a button is clicked. Return true if the button // must go to the next state. protected abstract bool OnButtonPressed(string name, Button button);
public override void LoadContent() { point = Vector2.Zero; calibratedPoint = Vector2.Zero; Vector2 viewLocation = new Vector2((ScreenManager.GraphicsDevice.Viewport.Width / 2.0f) - 320, (ScreenManager.GraphicsDevice.Viewport.Height / 2.0f) - 240); view = new KinectView(ScreenManager.Input.Sensor, ScreenManager.GraphicsDevice, viewLocation); UR = UL = LR = LL = Vector2.Zero; trackedArea = new Quadrilateral(UL, UR, LL, LR, 3, Color.Red, ScreenManager.GraphicsDevice); trackedLimb = new KinectTrackedObject(UL, UR, LL, LR); Content = new ContentManager(ScreenManager.Game.Services, "Content"); SpriteBatch = ScreenManager.SpriteBatch; if (((Manager)ScreenManager).Hand == "Left") { cursor = Content.Load<Texture2D>("Sprites/Left Hand"); } else { cursor = Content.Load<Texture2D>("Sprites/Right Hand"); } Texture2D textUR = Content.Load<Texture2D>("GUI/URButton"); Texture2D textUL = Content.Load<Texture2D>("GUI/ULButton"); Texture2D textLR = Content.Load<Texture2D>("GUI/LRButton"); Texture2D textLL = Content.Load<Texture2D>("GUI/LLButton"); Texture2D textSelect = Content.Load<Texture2D>("GUI/SelectButton"); float xOffset = ScreenManager.ScaleXPosition(ScreenManager.GraphicsDevice.Viewport.Width - textUR.Width); float yOffset = ScreenManager.ScaleYPosition(ScreenManager.GraphicsDevice.Viewport.Height - textUR.Height); float middle = ScreenManager.ScaleXPosition((ScreenManager.GraphicsDevice.Viewport.Width / 2.0f) - (textUR.Width / 2.0f)); Rectangle rectUL = new Rectangle(0, 0, textUR.Width, textUL.Height); Rectangle rectUR = new Rectangle((int)xOffset, 0, textUR.Width, textUR.Height); Rectangle rectLL = new Rectangle(0, (int)yOffset, textLR.Width, textLR.Height); Rectangle rectLR = new Rectangle((int)xOffset, (int)yOffset, textLL.Width, textLL.Height); Rectangle rectSelect = new Rectangle((int)middle, (int)yOffset, textSelect.Width, textSelect.Height); buttonUR = new GameLibrary.UI.Button(textUR, rectUR); buttonUL = new GameLibrary.UI.Button(textUL, rectUL); buttonLR = new GameLibrary.UI.Button(textLR, rectLR); buttonLL = new GameLibrary.UI.Button(textLL, rectLL); selectButton = new GameLibrary.UI.Button(textSelect, rectSelect); }
public void LoadContent(RichContentManager content) { // Load the background. _shapePalletBackground = content.Load<Texture2D>("ShapePallet/shapePalletBackground"); BoundingBox = new Rectangle( Position.X, Position.Y, _shapePalletBackground.Width, _shapePalletBackground.Height); // And the cancel button to the bottom of the palette. _cancelButton = content.MakeButton( BoundingBox.Center.X - (120/2), BoundingBox.Bottom, "GUI/cancel"); // LoadContent for all palette states; do not LoadContent more than once. var statesLoaded = new List<PaletteState>(); foreach (var state in _states.Values.Where( state => !statesLoaded.Contains(state))) { statesLoaded.Add(state); state.LoadContent(content); } }
public override void Update(Microsoft.Xna.Framework.GameTime gameTime) { // Lagic! //AddScreenAndChill(new LoadLevelScreen(levelName)); if (keyboard.CurrentKey != "") { if (keyboard.CurrentKey == "0") { if (searchQuery.Length > 0) searchQuery = searchQuery.Remove((searchQuery.Length) - 1); } else { searchQuery = searchQuery + keyboard.CurrentKey; } } if (goSearch.IsClicked()) { var temporaryList = new System.Collections.Generic.List<string> (); foreach (var item in levelNames.getFileNames()) { if (item.Contains(searchQuery)) { temporaryList.Add(item); } } fileList = new List(temporaryList, 600, 15, 25, listBackgroundPosition, listBackground, font, Color.Black, Color.Yellow); } if (btnCancel.IsClicked()) { AddScreenAndChill(new MenuScreen()); } if (btnOpen.IsClicked()) { if (fileList.SelectedElement() == "") { System.Windows.Forms.MessageBox.Show("Please select a level to load from the list."); } else { LevelLoad levelL = new LevelLoad(); SerializableLevel sLevel = levelL.initiateLoad(fileList.SelectedElement()); var graphics = GameManager.GlobalInstance.Graphics; GameManager.GlobalInstance.activeLevel = sLevel.constructLevel(Content, graphics); AddScreenAndChill(new LevelEditScreen()); } } if (delSearch.IsClicked()) { searchQuery = ""; clearSearchButton = MakeButton(((ScreenWidth / 2) - 275), 120, "GUI/nothing2Highlight"); } if (clearSearchButton.IsClicked()) { if (loadKeyBoard == false) { loadKeyBoard = true; } //else { loadKeyBoard = false; } clearSearchButton = MakeButton(((ScreenWidth / 2) - 275), 120, "GUI/nothing2Highlight"); } if (btnHelp.IsClicked()) { AddScreenAndChill(new LoadHelpScreen()); } // update load screen btnHelp.Update(MouseState); btnCancel.Update(MouseState); btnOpen.Update(MouseState); delSearch.Update(MouseState); clearSearchButton.Update(MouseState); goSearch.Update(MouseState); if (loadKeyBoard == true) { keyboard.Update(MouseState); } fileList.Update(gameTime, MouseState); base.Update(gameTime); }
public override void LoadContent() { base.LoadContent(); answerPosition = (new Vector2(((ScreenWidth / 2) - 398), 112)); btnCancel = MakeButton(0, 0, "GUI/cancel"); newLayoutHelp = MakeButton(0, 120, "HELP/newLayoutHelp"); loadLayoutHelp = MakeButton(0, 170, "HELP/loadLayoutHelp"); exitHelp = MakeButton(0, 220, "HELP/exitHelp"); gameBreakDownHelp = MakeButton(0, 270, "HELP/gameBreakDownHelp"); answerBackDrop = Content.Load<Texture2D>("HELP/answerBackDrop"); answerBackDropPosition = (new Vector2(((ScreenWidth / 2) - 400), 110)); title = Content.Load<Texture2D>("HELP/title"); titlePosition = (new Vector2(((ScreenWidth / 2) - 150), 0)); // //Below are the hard-coded answers for help topics. // font = Content.Load<SpriteFont>("font"); ///////////////////////////////////////////////////CUT OFF HERE////////// newLayoutHelpAnswer = "QUICK ANSWER:\nTap new layout if you would like to design a new\n" + "'Target-Tapping' environment for a patient.\n\n" + "LONG ANSWER:\n" + "As a therapist, your role is to design 'tapping environments' for\n" + "patients. Patients will then play the games you make for them.\n" + "To simplify the process of creating a 'tapping environment' we allow\n" + "you to save the tapping environments you create.\n" + "Enter a description of the game you intend to create so that in the \n" + "future you will be able to identify the 'tapping environment'. In\n" + "addition associate a name to the tapping environment. Name can be yours'\n" + "as the therapist, or it could be the patients name that the environment\n" + "is intended for. Either way just name and describe your environments\n" + "in a way that will allow them to be identified in upcoming sessions.\n\n" + "E.G. Description: forty_blue_squares\n"+ " Name: sydney_crosby\n" + "This will be saved as sydney_crosby_forty_blue_squares.\n" + "The important thing to note is for productivity make new environments \n" + "when a current like-environment does not already exist. When \n" + "like-environments do exist you may want to load them,\n" + "instead of making a new environments from scratch.\n"; loadLayoutHelpAnswer = ////////////////////////////////////////////////////// "QUICK ANSWER:\nTap 'load layout' if you would like to start playing a game\n" + "or change to a game that has already been designed. This game does not\n"+ "come with any pre-created games, thus if you or another therapist have\n" + "not already created a 'target tapping environment' you will first have\n"+ "to create one, which you will be able to load everytime afterwards.\n\n" + "LONG ANSWER:\nAs a therapist you may want to create environments that\n"+ "accomplish different tasks, or have different features. For this reason\n"+ "we allow you to retrieve levels you have previosuly saved that have been\n" + "designed with certain goals in mind. An example may be that JOE's\n" + "rehabilitation is currently best suited with a game that requires\n" + "him to use both his hands at once.\n"+ "Therefore, you have created and saved an environment that uses the\n" + "'multi' on every tapping event. JOE may also benefit from a environment\n"+ "where he has to spell out a word. Therefore you have created an\n" + "environment filled with letters.\n" + "By saving and loading games you have the option of having many\n" + "environments pre-planned, saving you precious time with the patient."; exitHelpAnswer = "The EXIT GAME button will return you to windows.\n"+ "Any unsaved progress will be lost. Use this or any one of the other\n"+ "EXIT buttons placed around the game to end your session.\n"; gameBreakDownHelpAnswer = /////////////////////////////////////////////////// "INTRO:\n"+ "This game is designed both for therapists and patients. Therapist will\n" + "use this game as a tool to save time and energy while working with\n" + "patients. Patients will in turn benefit from more diverse environments,\n" + "as well as a more modern and fun experience.\n"+ "This game is split into two interfaces, the therapist interface, and the\n"+ "patient interface. The therapist interface allows therapists to design\n"+ "environments they find match a patient or a group of patients needs best.\n"+ "The patient interface is presented as a game. Patients will have to tap\n"+ "objects as they appear on the screen, and will recieve a score depending\n"+ "on the number of times they tapped objects correctly. This provides a more\n" + "engaging experience for the patient.\n"+ "\nAVAILABLE TOOLS:\n"+ "As a therapist you will have the option to design many great environments\n"+ "and SAVE them for future use. This will save time and energy for you and\n"+ "your patients. The therapist interface is broken down into 4 main screens.\n"+ "The first is the main-menu, here you can choose to create new environments\n" + "or choose to load previously created environments. From here you may also\n"+ "exit to Windows.\n"+ "The second and third interfaces are the 'new layout' and 'load layout'\n"+ "screens. These screens repectively allow you to name a layout you are\n"+ "about to create for the first time, or load a layout that has previously\n"+ "been created by you or another therapist.\n"+ "The last therepist interface is the environment editor. This screen allows\n"+ "you as the thereapist to design your environment from scratch, or edit\n"+ "previously created environments that you have loaded.\n"+ "On the patients side they have the game interface. The game interface is\n"+ "where the patient will play the game that has been designed to aid in their\n"+ "rehabilitation. The patients role is to tap on the objects as they appear\n"+ "or, in general follow the therapists insructions."; //end of answers for help. }
public override void Update(GameTime gameTime) { if (keyboard.CurrentKey != "") { // Handle backspace. if (keyboard.CurrentKey == "0") { if (nameHighlight) { if (nameOfTherapist.Length > 0) { nameOfTherapist = nameOfTherapist.Remove((nameOfTherapist.Length) - 1); } } if (nameHighlight == false) { if (descriptionByTherapist.Length > 0) { descriptionByTherapist = descriptionByTherapist.Remove((descriptionByTherapist.Length) - 1); } } } else { if (nameHighlight) { nameOfTherapist = nameOfTherapist + keyboard.CurrentKey; nameCreated = true; } if (nameHighlight == false) { descriptionByTherapist = descriptionByTherapist + keyboard.CurrentKey; descriptionCreated = true; } } } if (btnCancel.IsClicked()) { AddScreenAndChill(new MenuScreen()); } if (btnCreate.IsClicked()) { if (nameCreated && descriptionCreated) { if ((nameOfTherapist.Length >= 3) && (descriptionByTherapist.Length >= 3)) { GameManager.GlobalInstance.activeLevel.levelName = nameOfTherapist + "_" + descriptionByTherapist; AddScreenAndChill(new LevelEditScreen()); } else { System.Windows.Forms.MessageBox.Show("Name and Description fields must have a minimum of 3 characters."); } } else { System.Windows.Forms.MessageBox.Show("Name and Description fields must have a minimum of 3 characters."); } } if (clearNameButton.IsClicked()) { nameHighlight = true; clearNameButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 40), "GUI/nothingHighlight"); clearDescriptionButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 100), "GUI/nothing"); } if (clearDescriptionButton.IsClicked()) { nameHighlight = false; clearNameButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 40), "GUI/nothing"); clearDescriptionButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 100), "GUI/nothingHighlight"); } if (delName.IsClicked()) { nameHighlight = true; nameOfTherapist = ""; clearNameButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 40), "GUI/nothingHighlight"); clearDescriptionButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 100), "GUI/nothing"); } if (delDesc.IsClicked()) { nameHighlight = false; descriptionByTherapist = ""; clearNameButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 40), "GUI/nothing"); clearDescriptionButton = MakeButton(((ScreenWidth / 2) - 200), ((ScreenHeight / 2) - 100), "GUI/nothingHighlight"); } if (btnHelp.IsClicked()) { AddScreenAndChill(new NewHelpScreen()); } delDesc.Update(MouseState); delName.Update(MouseState); btnCancel.Update(MouseState); btnCreate.Update(MouseState); btnHelp.Update(MouseState); clearNameButton.Update(MouseState); clearDescriptionButton.Update(MouseState); // Update the keyboard and all of its keys. keyboard.Update(MouseState); }
public override void LoadContent() { base.LoadContent(); answerPosition = (new Vector2(((ScreenWidth / 2) - 498), 112)); btnCancel = MakeButton(0, 0, "GUI/cancel"); toolbarHelp = MakeButton(0, 120, "HELP/toolbarHelp"); addObjectHelp = MakeButton(0, 170, "HELP/addObjectHelp"); designHelp = MakeButton(0, 220, "HELP/designHelp"); saveHelp = MakeButton(0, 270, "HELP/saveHelp"); answerBackDrop = Content.Load<Texture2D>("HELP/answerBackDrop"); answerBackDropPosition = (new Vector2(((ScreenWidth / 2) - 400), 110)); title = Content.Load<Texture2D>("HELP/title"); titlePosition = (new Vector2(((ScreenWidth / 2) - 150), 0)); font = Content.Load<SpriteFont>("font"); ///////////////////////////////////////////////////////////////////////////// toolbarHelpAnswer = "TOOLBAR BUTTONS:\n"+ "Home: The home button will take you to the games' start screen, from there\n"+ " you can choose to create a new environment, load an existing\n"+ " environment, or quit the game and return to Windows.\n"+ "Menu: The menu button will open a menu screen that allows you to save\n"+ " or load an environment, clear the current environment, exit to\n"+ " Windows, or go back to the level editor (closing the menu).\n"+ "Undo/Redo: Undo and Redo allow you to revert actions you recently made.\n"+ "Play: Pressing play will take you to the patient game, where the environment\n"+ " will be loaded and the patient can begin their rehabilitation. In the\n"+ " game screen the patient will have to tap on the objects as they appear,\n"+ " as well the therapist can pause the game with the button in the upper\n"+ " left corner of the screen.\n"+ "Multi: This is a button that allows you to tell the game creator that two or\n"+ " more objects should appear on screen in the game at a time. Once you\n"+ " turn on multi all objects placed until multi is turned off will appear\n"+ " simultanously in the game screen.\n"+ " To make two seperate multi events, place your first set of multi\n"+ " objets, then turn multi off, place the first object of the second\n" + " multi event, turn multi back on, and continue placing objects in\n"+ " that multi event until you are satisfied.\n"+ "Up Time: This is the amount of time each object in the game should last for,\n"+ " if the object is not tapped within this amount of time it will\n"+ " dissapear.\n"+ "Hold Time: This is the amount of time a object must be held for in order for it\n"+ " to dissapear.\n"+ "Add Label: You will notice inside the box that says add, there are shapes,\n"+ " numbers, and letters. Tap on whichever one you would like to\n"+ " place on the grid, select the prefered size and color, then tap on the\n"+ " screen where you would like to place the object.\n"; addObjectHelpAnswer = "So you want to add an object? No problem, first choose from the toolbar\n"+ "which object type you would like to add (shape, number, letter). Then\n"+ "choose which size you would like the object to be. Next choose the\n"+ "color you would like your object to be. Last thing, tap somewhere on the\n"+ "grid where you would like your object to be placed.\n"+ "If you would like to change the position of an object, tap on it in the\n"+ "editor to select it, now tap where you would like to place it, thats all.\n"+ "Objects by default will appear in the game in the order that they were placed\n"+ "on the grid. To specify that multiple objects should appear at one, press multi,\n"+ "while multi is ON you can put as many objects on the grid as you want to appear\n"+ "simultaneously."; designHelpAnswer = "Making a environment is left up to your creativity. If you are unsure how to\n"+ "place objects on the gird check out the other help topics available on the left.\n"+ "Some guidelines for making environments are: Put the objects on the gird in the\n"+ "order you would like them to appear in the game. Use the MULTI feature to place\n"+ "objects on the grid that will appear simultaneously. If you want to edit many\n"+ "objects in an evironment, don't, instead make a new environment. Save your\n"+ "environments often, dont risk loosing your changes."; saveHelpAnswer = "One of the most important features this game offers you as a therapist, is the\n"+ "ability to save the environments you create. This allows you to have quick access\n"+ "to a broad range of environments and makes sessions with patients more productive.\n"+ "To save an environment, tap MENU in the tool bar, then tap save, its that simple!\n"+ "Your environment will be saved with the name and description you gave when you\n"+ "initially filled out the new environment screen. If you loaded a environment,\n"+ "saving will overwrite the environment you initially loaded.\n"; // Load buttons 'n' stuff, yo! }