spr_hotbar 0 -1 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 0; 1 603 7 0 0 -1 2 self 0 0 1 x = view_xview[0]+view_wview[0]/2 - (424/2) y = view_yview[0]+view_hview[0]-59; if((mouse_x >= x && mouse_x <= x+424) && (mouse_y >= y && mouse_y <= y+59)) { var i = 0; for(var xx = 5; xx < (9*45); xx+=45) { if(mouse_x >= x+xx && mouse_x <= x+xx+45) { selected_slot = i; } i++; } } 1 603 7 0 0 -1 2 self 0 0 1 selected_slot --; selected_slot = selected_slot % 8; if(selected_slot < 0) { selected_slot = 0; } if(selected_slot > 8) { selected_slot = 8; } 1 603 7 0 0 -1 2 self 0 0 1 selected_slot ++; if(selected_slot < 0) { selected_slot = 0; } if(selected_slot > 8) { selected_slot = 8; } 1 603 7 0 0 -1 2 self 0 0 1 draw_self(); var i = 0; var yy = 7; for(var xx = 5; xx < (9*45); xx+=45+1) { if(i == selected_slot) { draw_set_color(make_colour_rgb(100,100,100)); draw_rectangle(x+xx,y+yy,x+xx+45,y+yy+44,false) } draw_sprite(spr_blocks,obj_inv_controller.inventory[i],x+xx+6,y+yy+7); var count = obj_inv_controller.inventoryCount[i]; var xoffset = string_width(string(count)) if(count > 1) { draw_set_color(c_white); draw_text(x+xx+45-xoffset,y+yy+30,string(count)); } i++ } 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 8; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 7; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 6; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 5; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 4; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 3; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 2; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 1; 1 603 7 0 0 -1 2 self 0 0 1 selected_slot = 0; 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0