mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-08-15 15:11:33 -05:00
Progress progress.
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
///align_x(region, unit%)
|
||||
///align_x(region, _unit%)
|
||||
|
||||
var zone = argument0;
|
||||
var percent = argument1;
|
||||
var zone = argument[0];
|
||||
|
||||
if (argument_count > 1)
|
||||
{
|
||||
var percent = argument[1];
|
||||
var deplacement = global.unit * percent;
|
||||
}
|
||||
else
|
||||
var deplacement = 0;
|
||||
|
||||
switch(zone)
|
||||
{
|
||||
case region.mid_left:
|
||||
case region.bot_left:
|
||||
var x_start = global.window_width*0.75 - global.window_width*0.25/2;
|
||||
break;
|
||||
|
||||
@@ -13,8 +21,18 @@ switch(zone)
|
||||
case region.bot_right:
|
||||
var x_start = global.window_width*0.75 + global.window_width*0.25/2;
|
||||
break;
|
||||
|
||||
case region._25:
|
||||
var x_start = global.window_width * 0.25;
|
||||
break;
|
||||
|
||||
case region._50:
|
||||
var x_start = global.window_width * 0.50;
|
||||
break;
|
||||
|
||||
case region._75:
|
||||
var x_start = global.window_width * 0.75;
|
||||
break;
|
||||
}
|
||||
|
||||
var deplacement = global.unit * percent;
|
||||
|
||||
return x_start + deplacement;
|
||||
@@ -1,7 +1,14 @@
|
||||
///button_align_y(region, unit%)
|
||||
///button_align_y(region, _unit%)
|
||||
|
||||
var zone = argument0;
|
||||
var percent = argument1;
|
||||
var zone = argument[0];
|
||||
|
||||
if (argument_count > 1)
|
||||
{
|
||||
var percent = argument[1];
|
||||
var deplacement = global.unit * percent;
|
||||
}
|
||||
else
|
||||
var deplacement = 0;
|
||||
|
||||
switch(zone)
|
||||
{
|
||||
@@ -10,11 +17,10 @@ switch(zone)
|
||||
var y_start = global.window_height * 0.7;
|
||||
break;
|
||||
|
||||
case region.bot_left:
|
||||
case region.bot_right:
|
||||
var y_start = global.window_height * 0.9;
|
||||
break;
|
||||
}
|
||||
|
||||
var deplacement = global.unit * percent;
|
||||
|
||||
return y_start + deplacement + __view_get(e__VW.YView, 0);
|
||||
18
Project/scripts/hud_draw_progress/hud_draw_progress.gml
Normal file
18
Project/scripts/hud_draw_progress/hud_draw_progress.gml
Normal file
@@ -0,0 +1,18 @@
|
||||
///hud_draw_progress();
|
||||
|
||||
//var scale = global.icon_scale * 2;
|
||||
var h = sprite_get_height(spr_source) * global.icon_scale / 1.75;
|
||||
|
||||
draw_sprite_stretched(spr_source, src.flip,
|
||||
align_x(region._50), align_y(region.bot_left, 0),
|
||||
align_x(region._25), h);
|
||||
|
||||
/*draw_sprite_ext(spr_source, src.white,
|
||||
align_x(region.bot_left, 0),
|
||||
align_y(region.bot_left, 0),
|
||||
scale, -scale, image_angle, image_blend, image_alpha);
|
||||
|
||||
draw_sprite_ext(spr_source, src.green,
|
||||
align_x(region.bot_left, 0),
|
||||
align_y(region.bot_left, 0),
|
||||
scale/2, scale, image_angle, image_blend, image_alpha);*/
|
||||
8
Project/scripts/hud_draw_progress/hud_draw_progress.yy
Normal file
8
Project/scripts/hud_draw_progress/hud_draw_progress.yy
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "ba2125b7-8439-ee4b-a25c-45062dccc0e6",
|
||||
"modelName": "GMScript",
|
||||
"mvc": "1.0",
|
||||
"name": "hud_draw_progress",
|
||||
"IsCompatibility": false,
|
||||
"IsDnD": false
|
||||
}
|
||||
@@ -28,4 +28,5 @@ global.counter = 9999;
|
||||
|
||||
global.change = false;
|
||||
|
||||
enum region { boxes, top, mid_left, mid_right, bot_left, bot_right }
|
||||
enum region { boxes, top, mid_left, mid_right, bot_left, bot_right,
|
||||
_0, _25, _50, _75, _100 };
|
||||
Reference in New Issue
Block a user