Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Draw Inventory
- for (var yy = 0; yy < height; yy++){ // Draw boxes top to bottom
- for (var xx = 0; xx < width; xx++){ // Draw boxes left to right
- var tx = x + 64 + (xx*box_size); // box x position on screen
- var ty = y + 64 + (yy*box_size); // box y position on screen
- var cur = (yy*width) + xx + 1; //the current item (y)
- show_debug_message(string(cur));
- draw_sprite(spr_items, 0, tx, ty); //draw Inventory background
- if (cur < item.length){
- if (item_index[cur,itemProperty.amount] > 0){ //does the player have any of this item?
- draw_sprite(spr_items, item_index[cur,itemProperty.sprite], tx, ty); //draw Inventory items
- if (item_index[cur,itemProperty.amount] > 0){ // draw item stack numbers
- //draw_circle_color(tx, ty-2, 6, c_white, c_white, false);
- draw_set_font(fnt_Small3);
- draw_text(tx+2, ty+2, item_index[cur,itemProperty.amount]);
- }
- }
- //var _grid = string(item_index);
- ds_grid_sort(real(item_index), itemProperty.indexNum, true); // how does this work?! Must use 'item_index'
- //ds_grid_sort(item_index,itemProperty.indexNum, true);
- }
- draw_sprite(spr_itemSelect, 0, (x + 64 + (gx*box_size)),y + 64 + (gy*box_size)); // draw item hover
- }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement