Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Window Drag
- if !window_get_fullscreen()
- {
- if !global.os_mobile
- {
- if mouse_check_button_pressed(mb_left)
- {
- mX = window_mouse_get_x();
- mY = window_mouse_get_y();
- }
- if mouse_check_button(mb_left)
- {
- posX -= mX - window_mouse_get_x();
- posY -= mY - window_mouse_get_y();
- window_set_position(window_get_x() + posX, window_get_y() + posY);
- mX = window_mouse_get_x();
- mY = window_mouse_get_y();
- }
- }
- }
- else if zoom != max_zoom
- {
- zoom = max_zoom;
- show_debug_message("Zoom");
- window_set_size(ideal_width*zoom, ideal_height*zoom);
- surface_resize(application_surface, ideal_width*zoom, ideal_height*zoom);
- alarm[0]=1;
- ini_open("options.ini");
- ini_write_real("Camera", "Zoom", obj_display_manager.zoom);
- ini_close();
- show_debug_message("Zoom saved!");
- }
- //Zoom Window
- if keyboard_check_pressed(vk_f11) || global.switchWindowMode
- {
- ini_open("options.ini");
- ini_write_real("Window", "Mode", !window_get_fullscreen());
- ini_close();
- window_set_fullscreen(!window_get_fullscreen());
- show_debug_message("Window mode saved!");
- window_set_size(ideal_width*zoom, ideal_height*zoom);
- global.switchWindowMode = false;
- }
- if keyboard_check_pressed(vk_f12) || global.changeScale// || keyboard_check_pressed(ord("Z"))
- {
- if !window_get_fullscreen()
- {
- show_debug_message("Zoom");
- if keyboard_check(vk_shift)
- zoom--;
- else
- zoom++;
- if(zoom > max_zoom)
- zoom=1;
- else if zoom < 1
- zoom = max_zoom
- ideal_width=round(ideal_height*aspect_ratio);
- if display_get_width() % ideal_width != 0
- {
- var _d = round(display_get_width()/ideal_width);
- ideal_width = display_get_width()/_d;
- }
- if display_get_height() % ideal_height != 0
- {
- var _d = round(display_get_height()/ideal_height);
- ideal_height = display_get_height()/_d;
- }
- if(ideal_width & 1)
- ideal_width++;
- if(ideal_height & 1)
- ideal_height++;
- window_set_size(ideal_width*zoom, ideal_height*zoom);
- surface_resize(application_surface, ideal_width*zoom, ideal_height*zoom);
- alarm[0]=1;
- ini_open("options.ini");
- ini_write_real("Camera", "Zoom", obj_display_manager.zoom);
- ini_close();
- show_debug_message("Zoom saved!");
- }
- global.changeScale = false;
- }
- //Set Cursor
- if window_get_fullscreen()
- window_set_cursor(cr_none);
- else
- window_set_cursor(cr_default);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement