This module helps to solve the problem with automatic adjustment of the GUI interface while maintaining all proportions and the correct position of the sprites relative to the center of the screen at different resolutions.
At the same time, the module was configured so that you could save time by transferring graphics from photoshop without inventing or choosing the coordinates where you need to put the sprites, but entering the coordinates of the sprites directly from photoshop By default, the module supports embedding graphics from a Photoshop canvas of 1920x1080 and all other 16x9 (in case of adjusting the variables responsible for the canvas size) Other canvas sizes have not yet been tested In addition to the placement of sprites, it is possible to create buttons that also calculate the correct coordinate and proportion of this button at different screen ratios Module functions and their descriptions:
gm_resize () - a function that is called when the resolution of the game window is changed needed to adjust the position of everything that needs to be drawn using GuiMe
gm_draw_background (sprite) - a function that draws a sprite (I don't think you will need it because it may not work as you might think, but in this example, it is used to place the background)
gm_draw_text (x, y, SizeX, SizeY) - a function for drawing text indicating the size of the text
gm_draw_sprite_primitive (sprite, x, y) - a function for drawing a sprite with coordinates only gm_draw_sprite_rotate (sprite, x, y, xscale, yscale, rot) - a function for drawing a sprite indicating the size of the sprite and its direction (for rotation) gm_draw_sprite_ext (sprite, x, y, xscale, yscale, rot, col, alpha) - a function for drawing a sprite indicating the size of the sprite, its direction, color and transparency
gm_mouse () - a function that is called at the time of an event, for example, at the moment of a click, updates the variables gm_mouse_x and gm_mouse_y which are recalculated for the new screen resolution.
gm_draw_rectangle (x1, y1, x2, y2, frame) - a function for drawing a rectangle where the coordinates of 4 corners and the thickness of the frame are set when the thickness value is 0, the rectangle is filled
gm_draw_rectangle_sustem (not for manual configuration) - system function for drawing rectangle using (gm_draw_rectangle)
Updates are planned: 1. Test the module on different canvas sizes 2. Fixing issues with unsupported photoshop canvas sizes 3. Correction of the function of placing skeletal animation sprites.