Progress progress.

This commit is contained in:
TheGreenTie 2020-03-01 20:43:42 -06:00
parent 97e8527df5
commit 680cb32028
30 changed files with 96 additions and 12 deletions

View File

@ -16358,6 +16358,14 @@
"resourceType": "GMIncludedFile"
}
},
{
"Key": "ba2125b7-8439-ee4b-a25c-45062dccc0e6",
"Value": {
"id": "be3ed569-6819-328d-2f49-81989229ea3c",
"resourcePath": "scripts\\hud_draw_progress\\hud_draw_progress.yy",
"resourceType": "GMScript"
}
},
{
"Key": "ba57a7eb-2620-4c04-9d05-ca8099fd063c",
"Value": {
@ -22265,6 +22273,7 @@
"b4ff0585-7cbf-020b-86b6-71a74247d56a",
"247a6c1c-04b6-7db1-67ff-297c3ee1feca",
"aa0cd879-2cce-411a-dd1a-10c3fd63f802",
"ba2125b7-8439-ee4b-a25c-45062dccc0e6",
"51d00fa8-eb85-4086-a732-a161d9d217d8",
"2370f9cd-bc43-8204-019c-9bc13fa8d58f",
"5c7fb6ce-864a-a30e-f665-d51d74835878",

View File

@ -1,6 +1,6 @@
enum but { info, area, plus, minus, image };
enum src { red, yellow, green, blue, black, pink, orange, purple, white };
enum src { red, yellow, green, blue, black, pink, orange, purple, white, flip };
hover = false;
pressed = false;

View File

@ -2,6 +2,7 @@
hud_draw_selected();
hud_draw_counter();
hud_draw_progress();
// Debug
draw_guidelines(true);

View File

@ -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;

View File

@ -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);

View 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);*/

View File

@ -0,0 +1,8 @@
{
"id": "ba2125b7-8439-ee4b-a25c-45062dccc0e6",
"modelName": "GMScript",
"mvc": "1.0",
"name": "hud_draw_progress",
"IsCompatibility": false,
"IsDnD": false
}

View File

@ -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 };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 143 B

View File

@ -212,6 +212,28 @@
"LayerId": "76f0ab86-cdf5-42b1-9e75-0396a4ea6aca"
}
]
},
{
"id": "7f79686c-8273-4a98-9006-e2a14c2d0db9",
"modelName": "GMSpriteFrame",
"mvc": "1.0",
"SpriteId": "55447b82-1730-4429-a3f8-d81a83dcacf6",
"compositeImage": {
"id": "44db78bd-5a09-4a46-9b80-b40a8c59b039",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "7f79686c-8273-4a98-9006-e2a14c2d0db9",
"LayerId": "00000000-0000-0000-0000-000000000000"
},
"images": [
{
"id": "09f9575d-f143-4e93-906b-fd098db0a917",
"modelName": "GMSpriteImage",
"mvc": "1.0",
"FrameId": "7f79686c-8273-4a98-9006-e2a14c2d0db9",
"LayerId": "76f0ab86-cdf5-42b1-9e75-0396a4ea6aca"
}
]
}
],
"gridX": 0,

View File

@ -65,6 +65,7 @@
"b4ff0585-7cbf-020b-86b6-71a74247d56a",
"247a6c1c-04b6-7db1-67ff-297c3ee1feca",
"aa0cd879-2cce-411a-dd1a-10c3fd63f802",
"ba2125b7-8439-ee4b-a25c-45062dccc0e6",
"6ce290dc-805f-91e8-ca66-1b31a6b638b4"
],
"filterType": "GMScript",