I developed the settings menu for our game. The picture on the left is an in game screenshot of how it looks in game. We may be getting rid of the font and font size changers to keep things more simple. Having the font be too big and bleeding out of text boxes is very possible issue and it would end up hurting more than helping. The volume sliders and the timer functionality will most definitely be staying. Below there are a couple examples of code that show how parts of the settings menu work.
This code is for the slider buttons for the volume controls. This makes the value of the button a value between 0-100 based on the distance across the bar the slider has traveled.
This code is for changing the sprite in the checkbox to one that shows the mouse is hovering over it and is ready to be clicked and changed.
This is the organizing mini-game that the player will do each time they come back to their locker in between classes. It is to help the player practice space management as well as making sure they're prepared for all their classes. The gif to the left is an example of the player getting their items for math class, as well as the items they need for every class which are the notebook, eraser and pencil pouch. Below I've provided examples that show the development process of this mini-game.
This code is for checking if the correct items for the upcoming class are in the backpack. Each class will need 6 items in the backpack. 3 of them are the same general items but another 3 are specific to that class and each class has a case that checks for its specific items.
Each item in the minigame has the above code and it is for snapping the item to an appropriate space for it size in either the locker or the backpack. There is a grid system built behind both the locker and backpack of different sized grid spaces and each item checks for the closest one for it's size and clings to it upon left mouse button release. If that grid space is alrady taken then the items returns to where it was before the player started moving it.
Behind the backpack and the locker are grid systems for where the items will snap to. Each item has a size variable depending on it's width/height ratio with 75px being the value for 1 in this instance. For example, the ruler item has an item size of 1.4 because it is 75px wide and 300px tall. The grid shown in the picture is the 1.4 grid, each grid slot is also 75px wide and 300px tall as these are the slots that all items with the item size of 1.4 will snap into. The grid spaces are stacked on top of each other to make every space in the locker and backpack accessible to any item of any size. Each item size grid has its own layer in the room but items of different sizes cannot overlap with each other because of the first if statement in the backpack item placement code picture to the left of this one.
This is the minigame the player will do during their music class. It involves clicking and dragging notes of different length and pitch from the right side of the screen and dropping them on the music sheet then they can press play and hear the song they made. They can also easily reset all the notes back to their starting spots in case they want to try again or keep playing the minigame. There is no stipulation to it, the player may leave the minigame and continue the main game whenever they wish. Below I've provided examples about the development of the minigame.
This code is on the Left Pressed event of every note. If the note is not colliding with where it started or with another note then it will cling to the nearest slot on the music sheet for it's note length and play the sound associated with it. Each slot the notes can go into has an index number associated with it and it takes that index number and puts the note in that same spot in the notes array. The notes array is what is played when the player clicks the Play Song button. It will also get the previous location of the note and remove it from that location in the array.
This is only a snippet of the code that plays the song upon button press to do so. It loops through the array of notes and when it finds one it plays it and waits for the current note to stop playing before continuing to cycle through the array. Slots without a note in them have a 0 instead and it will skip over those slots.