@Rhino To add mouse compatibility the only non native function you need is to be able to get the mouse coordinates.
Here is a script snippet for you:
Spoiler
Just paste it into a text file, name doesn't matter and save as a .js.
This small snippet stores the mouse X and Y location each time it is moved in variables 1 and 2. You can change the number besides idX and idY to what you want.
Using a loop you have to calculate the coordinates of the boundaries of each option and then check the mouse coordinates. You basically just have to check if the two mouse coordinates are contained within a rectangle for each of your options.
If it's within the rectangle of new game, highlight that one. Same for all other functions.
Then you can use "TouchInput.isTriggered()" as a condition: script to do whatever you want depending on what is highlighted when the mouse is triggered.
Below is a solution in pseudo code if you're stumped.
I encourage you to actually try things out before reading, you'll learn a lot more.
Spoiler
Your event would look like this:
Let's say this is your rectangle:
x1,y1 ------ x2
!----------------!
y2-------------!
Loop
- If mouse is in rectangle "new game" (mouse x >= x1 and <= x2 and mouse y >= y1 and mouse y <= y2)
- Highlight new game (switch images, play cursor sound,...)
- Store 0 in variable index
- If mouse is in rectangle "continue" (redefine rectangle coordinates)
- Highlight continue
- Store 1 in variable index
- If touchinput is triggered
- If index = 0 -> trigger new game stuff, break loop
- If index = 1 -> trigger continue stuff, break loop
End loop
Of course as usual with UI stuff it's more efficient to do it with a plugin, but well that's not what this thread is about.