I would say your question has two parts. First, moving objects. Second selecting objects. Both of these have to be done on the GUI layer.
For moving objects, you just want to do it like normal except relative to the GUI layer. The type of movement you see in the gif is some type of easeing or tweening - which is effectively a lerp with slightly different parameters. You can find free assets for it on the marketplace and tutorials on YouTube (try tweening coding math or ease in ease out code workshop). Have an onscreen point and an offscreen point and tween between them when you want (on create, on activate, etc.). Remember all movement is relative to the GUI layer, not the room layer.
For selecting, if you want to do it with a mouse or touch, then Morendral is right, you just translate the mouse to the GUI layer use device_mouse_x_to_gui. If you want to do it with a keyboard or gamepad that's obviously a little different. How I do it is like this:
- Add all button instance IDs to an array (or if you want to be fancy a grid)
- cycle through the array with keypresses (just find a menu system tutorial on YouTube that uses the keyboard to see what I mean or look at my free asset linked below)
- When you 'select' something in the array run that button's script using with or some similar thing - pseudo code example:
Code:
if (select) {
with (button_array[selected_button]) {
script_execute(script);
}
}
I know that's a little brief, but really your question contains like six or seven parts, some of which take a lot of explaining, so hopefully this is enough. If you have a specific question about something above though I can try to answer it.
Also, I'm currently working on a button pack. While it won't help with the first part (moving objects) it should do the second. Feel free to add comments or suggestions as I work on it:
https://forum.yoyogames.com/index.php?threads/button-pack.53632/