Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(global.system[? "max-stamina"] < 100)
- {
- global.system[? "max-stamina"] = 100;
- }
- var timeString = string(global.system[? "hour"]) + ":" + string(global.system[? "minute"]);
- ///Draw the hud back
- draw_sprite_ext(sprSunIcon, timeIcon(), (960-(128*global.scale)), 16, global.scale, global.scale, obj_control.iconRot, c_white, 1);
- if(global.weather == "Rainy")
- draw_sprite_ext(sprRainIcon, -1, (960-(128*global.scale)), 16, global.scale, global.scale, 0, c_white, 1);
- draw_set_colour(c_white);
- draw_sprite_ext(sprHUDBack, 0, (960-(128*global.scale)), 0, global.scale, global.scale, 0, c_white, 1);
- draw_set_colour(c_black);
- draw_text_ext_transformed(((960-(128*global.scale)))+14, 10, timeString, 16, -1, global.scale, global.scale, 0);
- draw_text_ext_transformed((960 -(128*global.scale)) + 14, (24 * global.scale)+2, global.held, 16, -1, global.scale, global.scale, 0);
- draw_set_halign(fa_right);
- draw_text_ext_transformed(956, 10, "$: " + string(global.system[? "money"]), 16, -1, global.scale, global.scale, 0);
- draw_set_halign(fa_left);
- draw_set_colour(c_white);
- draw_text_ext_transformed(((960-(128*global.scale)))+12, 8, timeString, 16, -1, global.scale, global.scale, 0);
- draw_text_ext_transformed((960 -(128*global.scale)) + 12, (24 * global.scale), global.held, 16, -1, global.scale, global.scale, 0);
- draw_set_halign(fa_right);
- draw_text_ext_transformed(954, 8, "$: " + string(global.system[? "money"]), 16, -1, global.scale, global.scale, 0);
- draw_set_halign(fa_left);
- draw_set_alpha(global.hudAlph);
- draw_sprite_ext(sprHotbar, 0, 480, 540, global.scale, global.scale, 0, c_white, global.hudAlph);
- //draw the items in the hot bar list
- var hotList = ds_list_create();
- var hotItemList = ds_list_create();
- for(var i = 0; i <= 9; i++)
- {
- hotList[| i] = itemSprite(global.inv[? "inventory-"+string(i)+"-item"]);
- hotItemList[| i] = global.inv[? "inventory-"+string(i)+"-amount"];
- }
- switch(global.scale)
- {
- case 2:
- {
- var fourtyX = 44;
- }
- case 3:
- {
- var fourtyX = 66;
- }
- }
- if(global.scale == 3)
- {
- draw_sprite_ext(sprHeld, 0, 0, sprite_get_height(sprBarBack)*global.scale, global.scale, global.scale, 0, c_white, global.hudAlph);
- draw_sprite_ext(itemSprite(global.inv[? "inventory-"+string(global.system[? "invSel"])+"-item"]), 0, 36, (sprite_get_height(sprBarBack)*global.scale) + 24, global.scale, global.scale, 0, c_white, global.hudAlph);
- for(var j = 0; j <= 9; j++)
- {
- draw_sprite_ext(hotList[| j], 0, ((fourtyX+2)+((480 -(144 * global.scale)) + fourtyX))+(j*fourtyX), 540 - (16*global.scale), global.scale, global.scale, 0, c_white, global.hudAlph);
- }
- draw_sprite_ext(sprHotbarSel, real(global.system[? "invSel"]), 480, 540, global.scale, global.scale, 0, c_white, global.hudAlph);
- for(var z = 0; z <= 9; z++)
- {
- draw_set_font(obj_control.invFont);
- draw_set_halign(fa_center);
- if(hotItemList[| z] > 0)
- {
- drawTextOutlined(hotItemList[| z], round(((fourtyX+2)+((480 -(144 * global.scale)) + fourtyX))+(z*fourtyX)), round(540 - 16), c_white, c_black)
- }
- draw_set_halign(fa_left);
- }
- }
- else
- {
- draw_sprite_ext(sprHeld, 0, 0, sprite_get_height(sprBarBack)*global.scale, global.scale, global.scale, 0, c_white, global.hudAlph);
- draw_sprite_ext(itemSprite(global.inv[? "inventory-"+string(global.system[? "invSel"])+"-item"]), 0, 24, (sprite_get_height(sprBarBack)*global.scale) + 24, global.scale, global.scale, 0, c_white, global.hudAlph);
- for(var j = 0; j <= 9; j++)
- {
- draw_sprite_ext(hotList[| j], 0, (((480 -(114 * global.scale))) + (j*fourtyX))+30, 540 - (16*global.scale), global.scale, global.scale, 0, c_white, global.hudAlph);
- }
- draw_sprite_ext(sprHotbarSel, real(global.system[? "invSel"]), 480, 540, global.scale, global.scale, 0, c_white, global.hudAlph);
- for(var z = 0; z <= 9; z++)
- {
- draw_set_font(obj_control.invFont);
- draw_set_halign(fa_center);
- if(hotItemList[| z] > 0)
- {
- drawTextOutlined(hotItemList[| z], (((480 -(114 * global.scale))) + (z*fourtyX))+30, 540 - 16, c_white, c_black)
- }
- draw_set_halign(fa_left);
- }
- }
- draw_set_alpha(1);
- /*
- width = (Current Health / Max Health) * Max Size of Bar
- draw_text(960 - 200,hy+42,string_hash_to_newline("$:"));
- draw_set_halign(fa_right);
- draw_text(956,hy+42,string_hash_to_newline(string(global.system[? "money"])));
- draw_set_halign(fa_left);
- draw_text(hx+6,hy+8,string_hash_to_newline(global.held));
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement