I get that, but have you even tried?
Anyways, I'd probably do it in the following way (I'm obviously oversimplifying, but should give you an idea):
- Create a background that includes: the yellow part, the decorations on the left and right, and the white text box (without the text)
- Create a "screenshot" for every stage, and import is a background or sprite
- Create a background / sprite for the stage name, for every stage (alternatively, if you graphic is simpler, you can avoid this and just draw the text on top using draw_text)
Then, prepare an object (with a low depth, so it will be drawn on top) that will be created when you need to open the level selection overlay. This object needs to get all the required information to display the correct level data, such as screenshot, description, best time, ... I can imagine the create event being something like this:
GML:
stage_name = ""; //either the string or the sprite with the stage name
stage_description = "";
stage_room = -1; //room you will be sent to once you accept
stage_time = "--:--"; //best time
stage_sprite = -1; //the small stage preview image
In the draw event, you put together all the information you have in order to compose the whole stage selection screen. Something like this:
GML:
draw_background(x, y, bkg_stage_select); //draw the yellow background
draw_background(x + WHATEVER, y + WHATEVER, stage_sprite); //draw the screenshot
/* set your font, color, etc... as usual for drawing the text */
draw_text(x + WHATEVER, y + WHATEVER, stage_name);
/* set your font, color, etc... as usual for drawing the text */
draw_text_ext(x + WHATEVER, y + WHATEVER, stage_description, -1, YOUR_DESCRIPTION_WIDTH); //use draw_text_ext in order to have your description go to a new line when reaching the border of the white box
/* set your font, color, etc... as usual for drawing the text */
draw_text(x + WHATEVER, y + WHATEVER, stage_time);
You can then create a script that can be called whenever you need to display the stage select screen. The script is in charge of creating an instance of the object above with the stage information passed as arguments:
GML:
///open_stage_selection(stage_name, stage_description, stage_room, stage_time, stage_sprite)
var _inst = instance_create(0, 0, obj_stage_select);
_inst.stage_name = argument0;
_inst.stage_description = argument1;
_inst.stage_room = argument2;
_inst.stage_time = argument3;
_inst.stage_sprite = argument4;
return _inst;
You can then call the script somewhere else, for example in collision with a portal, whatever your condition is:
GML:
open_stage_select("Green Hill", "Your stage description", rm_green_hill, "13:02", bkg_green_hill);
You just need then to set the key or whatever action confirms the selection on the player part to go to the room stored in the
stage_room variable.
I know the above is very generic and definitely oversimplified, but your question is not specific either.