diff --git a/UGP.gmx/UGP.project.gmx b/UGP.gmx/UGP.project.gmx index e0f2823..4c2e464 100644 --- a/UGP.gmx/UGP.project.gmx +++ b/UGP.gmx/UGP.project.gmx @@ -32,7 +32,7 @@ winspool.dll winspool.dll - C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\datafiles\winspool.dll + C:\Users\Li\Desktop\UGP\UGP\UGP.gmx\\\datafiles\winspool.dll -1 75776 2 @@ -50,7 +50,7 @@ 0 0 0 - 0 + -1 0 0 0 @@ -147,6 +147,7 @@ sprites\spr_checkmark sprites\spr_mute + sprites\spr_fullscreen sprites\spr_back sprites\spr_go sprites\spr_textinput @@ -194,6 +195,11 @@ + + + + + fonts\fn_text @@ -222,6 +228,7 @@ objects\obj_back objects\obj_mute + objects\obj_fullscreen objects\obj_lstbox_entry_module @@ -245,11 +252,10 @@ objects\obj_draw_exports objects\obj_status_draw objects\obj_draw - objects\obj_cursor - + rooms\rm_product_select rooms\rm_crack_gm8 rooms\rm_crack_studio diff --git a/UGP.gmx/objects/obj_draw.object.gmx b/UGP.gmx/objects/obj_draw.object.gmx index cc858d9..889f7d0 100644 --- a/UGP.gmx/objects/obj_draw.object.gmx +++ b/UGP.gmx/objects/obj_draw.object.gmx @@ -124,7 +124,7 @@ centerY = room_height/2; draw_set_font(fn_text); draw_set_color(c_white); -draw_text(0,0,"Press 'ESC' to exit."); +draw_text_center(0,"Press 'ESC' to exit."); if(draw_flashing_text){ draw_text(centerX - (string_width(global.flashing_msg) / 2), room_height - (string_height(global.flashing_msg)), global.flashing_msg); diff --git a/UGP.gmx/objects/obj_fullscreen.object.gmx b/UGP.gmx/objects/obj_fullscreen.object.gmx new file mode 100644 index 0000000..9f1237f --- /dev/null +++ b/UGP.gmx/objects/obj_fullscreen.object.gmx @@ -0,0 +1,132 @@ + + + spr_fullscreen + 0 + -1 + 0 + -1 + <undefined> + <undefined> + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + checked = 0; +image_speed = 0; +image_index = 0; + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + if(checked) + image_index = 2; +else + image_index = 0 + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + if(checked) + image_index = 3; +else + image_index = 1 + + + + + + + + 1 + 603 + 7 + 0 + 0 + -1 + 2 + + + self + 0 + 0 + + + 1 + fullscreen_toggle(); + + +if(checked == 0) + checked = 1; +else + checked = 0; + + +if(checked) + image_index = 3; +else + image_index = 1; + + + + + + + 0 + 0 + 0 + 0.5 + 0.100000001490116 + 0 + 0.100000001490116 + 0.100000001490116 + diff --git a/UGP.gmx/objects/obj_main.object.gmx b/UGP.gmx/objects/obj_main.object.gmx index 9bce5b7..95d874c 100644 --- a/UGP.gmx/objects/obj_main.object.gmx +++ b/UGP.gmx/objects/obj_main.object.gmx @@ -58,7 +58,7 @@ if(obj_draw.back_down == false && obj_draw.back_up == false) 1 - ///setup views + ///Check if the room is too big for the display. var display_height; display_height = display_get_height() @@ -66,16 +66,13 @@ display_height = display_get_height() var display_width; display_width = display_get_width() -if(room_height > display_height || room_width > display_width){ - view_enabled = true; - view_visible[view_current] = true; - view_object[view_current] = obj_cursor; - view_hport[view_current] = room_height; - view_wport[view_current] = room_width; - view_hview[view_current] = room_height; - view_wview[view_current] = room_width; -} +if(room_width > display_width && room_height > display_height){ + + fullscreen_off(); + obj_fullscreen.checked = 1; + +} @@ -98,7 +95,8 @@ if(room_height > display_height || room_width > display_width){ 1 - external_free("UGP.dll"); + /// delete included files +external_free("UGP.dll"); file_delete("UGP.dll"); file_delete("winspool.dll"); @@ -125,7 +123,7 @@ file_delete("ModuleDownloader.exe"); 1 - ///initalize + ///Initalize //UGP.DLL imports global.getMachineGuid = external_define("UGP.dll","GetMachineGuid",dll_cdecl,ty_string,0); global.MD5 = external_define("UGP.dll","MD5",dll_cdecl,ty_string,1,ty_string); @@ -142,6 +140,9 @@ global.LOCALAPPDATA = external_call(global.getLocalAppDataFolder); global.download_exports = false; instance_create((room_width-(44/2))-10, (room_height-(44/2))-10, obj_mute); +instance_create(35, 35, obj_fullscreen); + +cursor_sprite = spr_cursor; global.direction = 0; sound_loop(snd_mus); @@ -152,6 +153,8 @@ for(i = 0; i < 1000; i+=1) obj = instance_create(obj_x, obj_y, obj_star); } + + diff --git a/UGP.gmx/rooms/rm_close.room.gmx b/UGP.gmx/rooms/rm_close.room.gmx index 25e63d8..04feb84 100644 --- a/UGP.gmx/rooms/rm_close.room.gmx +++ b/UGP.gmx/rooms/rm_close.room.gmx @@ -40,7 +40,7 @@ - + diff --git a/UGP.gmx/rooms/rm_crack_gm8.room.gmx b/UGP.gmx/rooms/rm_crack_gm8.room.gmx index c2dc4d9..fd0f6af 100644 --- a/UGP.gmx/rooms/rm_crack_gm8.room.gmx +++ b/UGP.gmx/rooms/rm_crack_gm8.room.gmx @@ -40,7 +40,7 @@ - + diff --git a/UGP.gmx/rooms/rm_crack_studio.room.gmx b/UGP.gmx/rooms/rm_crack_studio.room.gmx index c2dc4d9..fd0f6af 100644 --- a/UGP.gmx/rooms/rm_crack_studio.room.gmx +++ b/UGP.gmx/rooms/rm_crack_studio.room.gmx @@ -40,7 +40,7 @@ - + diff --git a/UGP.gmx/rooms/rm_keygen_gm5.room.gmx b/UGP.gmx/rooms/rm_keygen_gm5.room.gmx index 51ff809..a31bc6d 100644 --- a/UGP.gmx/rooms/rm_keygen_gm5.room.gmx +++ b/UGP.gmx/rooms/rm_keygen_gm5.room.gmx @@ -40,7 +40,7 @@ - + diff --git a/UGP.gmx/rooms/rm_product_select.room.gmx b/UGP.gmx/rooms/rm_product_select.room.gmx index c482eb4..815f029 100644 --- a/UGP.gmx/rooms/rm_product_select.room.gmx +++ b/UGP.gmx/rooms/rm_product_select.room.gmx @@ -40,7 +40,7 @@ - + @@ -51,8 +51,7 @@ - - + 0 diff --git a/UGP.gmx/scripts/draw_text_center.gml b/UGP.gmx/scripts/draw_text_center.gml new file mode 100644 index 0000000..6880900 --- /dev/null +++ b/UGP.gmx/scripts/draw_text_center.gml @@ -0,0 +1,2 @@ +///draw_text(y, text) +draw_text((room_width / 2) - (string_width(argument1) / 2), argument0, argument1); diff --git a/UGP.gmx/scripts/fullscreen_off.gml b/UGP.gmx/scripts/fullscreen_off.gml new file mode 100644 index 0000000..f18b18a --- /dev/null +++ b/UGP.gmx/scripts/fullscreen_off.gml @@ -0,0 +1,10 @@ +///fullscreen_off() +window_set_fullscreen(false); +window_set_size(960, 544); + +window_set_region_size(window_get_width(), window_get_height(), true); +window_set_region_scale(0, true); + +window_set_position((display_get_width() / 2) - (window_get_width() / 2), (display_get_height() / 2) - (window_get_height() / 2)); + + diff --git a/UGP.gmx/scripts/fullscreen_toggle.gml b/UGP.gmx/scripts/fullscreen_toggle.gml new file mode 100644 index 0000000..c1d3ec8 --- /dev/null +++ b/UGP.gmx/scripts/fullscreen_toggle.gml @@ -0,0 +1,7 @@ +///fullscreen_toggle() +if(window_get_fullscreen()) { + fullscreen_off(); +} +else{ + window_set_fullscreen(true); +} diff --git a/UGP.gmx/sound/audio/snd_mus.ogg b/UGP.gmx/sound/audio/snd_mus.ogg index 30bf056..ab0a4ee 100644 Binary files a/UGP.gmx/sound/audio/snd_mus.ogg and b/UGP.gmx/sound/audio/snd_mus.ogg differ diff --git a/UGP.gmx/sprites/images/spr_fullscreen_0.png b/UGP.gmx/sprites/images/spr_fullscreen_0.png new file mode 100644 index 0000000..fbe310c Binary files /dev/null and b/UGP.gmx/sprites/images/spr_fullscreen_0.png differ diff --git a/UGP.gmx/sprites/images/spr_fullscreen_1.png b/UGP.gmx/sprites/images/spr_fullscreen_1.png new file mode 100644 index 0000000..46a3ef0 Binary files /dev/null and b/UGP.gmx/sprites/images/spr_fullscreen_1.png differ diff --git a/UGP.gmx/sprites/images/spr_fullscreen_2.png b/UGP.gmx/sprites/images/spr_fullscreen_2.png new file mode 100644 index 0000000..f81dfc8 Binary files /dev/null and b/UGP.gmx/sprites/images/spr_fullscreen_2.png differ diff --git a/UGP.gmx/sprites/images/spr_fullscreen_3.png b/UGP.gmx/sprites/images/spr_fullscreen_3.png new file mode 100644 index 0000000..4bc5087 Binary files /dev/null and b/UGP.gmx/sprites/images/spr_fullscreen_3.png differ diff --git a/UGP.gmx/sprites/spr_back.sprite.gmx b/UGP.gmx/sprites/spr_back.sprite.gmx index 7e95c19..fc0209f 100644 --- a/UGP.gmx/sprites/spr_back.sprite.gmx +++ b/UGP.gmx/sprites/spr_back.sprite.gmx @@ -1,7 +1,7 @@ - 41 - 41 + 44 + 44 0 0 0 diff --git a/UGP.gmx/sprites/spr_fullscreen.sprite.gmx b/UGP.gmx/sprites/spr_fullscreen.sprite.gmx new file mode 100644 index 0000000..ed4541b --- /dev/null +++ b/UGP.gmx/sprites/spr_fullscreen.sprite.gmx @@ -0,0 +1,19 @@ + + + 25 + 25 + 0 + 0 + 0 + 2 + 3 + 46 + 3 + 46 + + images\spr_fullscreen_0.png + images\spr_fullscreen_1.png + images\spr_fullscreen_2.png + images\spr_fullscreen_3.png + +