Duhjoker
Well-known member
Ok guys I need to create a short simple menu system that can be expanded upon. One of the users over at gamebuino wrote a small simple menu system a long while back when I first started the project. but I don't understand how the slot system work or how to get the item to appear in the right slot or really how to get any thing into a slot. I'm not seeing any kind of coordinate system that will put the item in to a slot in the menu. And its a lil funky.
Here's a link to the OG page where the instruction is given....
http://legacy.gamebuino.com/forum/viewtopic.php?f=8&t=3492
I also found the sketch and removed every thing but the menu stuff
Edit::: ok I understand the slot layout and can probably expand it on my own. I just don't understand how the slots are located in the bubble and how to place something in the slot in the bubble.
Here's a link to the OG page where the instruction is given....
http://legacy.gamebuino.com/forum/viewtopic.php?f=8&t=3492
I also found the sketch and removed every thing but the menu stuff
Code:
#ifndef _Menu_H_
#define _Menu_H_
#include "Variables.h"
int menu_1 = 1;
int key_1 = 1;
int key_2 = 1;
int sox_1 = 1;
int menuy = -84;
int keyy = -76;
int scroll1;
/////add item_loc's here////
int key_loc;
int key2_loc;
int sox_loc;
////item slot locations////
int keyslot;
int keyslot2;
int soxslot;
int Active_slot;
int S1 = 0;
int S2 = 0;
int S3 = 0;
int S4 = 0;
const byte menu1[] PROGMEM = {88,49,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00010001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111000,B10000000,B00100110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000110,B01000000,B00101000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B01000000,B01001000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B00100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B11111111,B11111000,B00111111,B11111110,B00001111,B11111111,B10000011,B11111111,B11100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B10000000,B00001000,B00100000,B00000010,B00001000,B00000000,B10000010,B00000000,B00100000,B10100000,B01010000,B11111111,B11111000,B00111111,B11111110,B00001111,B11111111,B10000011,B11111111,B11100000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B10100000,B01010000,B00000000,B00000010,B00000000,B00000000,B00000000,B00000000,B00000100,B00000000,B00000000,B10100000,B01001000,B00000000,B00000100,B11111111,B11111111,B11111111,B11111111,B11110010,B00000000,B00000001,B00100000,B00101000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B00001010,B00000000,B00000001,B01000000,B00100110,B00000000,B00000101,B01110000,B00000000,B00000010,B00000000,B00001010,B00000000,B00000110,B01000000,B00010001,B11111111,B11111101,B00100110,B01010011,B01100111,B00100110,B10101011,B11111111,B11111000,B10000000,B00001100,B00000000,B00000001,B00100101,B01010110,B01010010,B01010100,B11101000,B00000000,B00000011,B00000000,B00000011,B11111111,B11111101,B01110101,B00100011,B01010010,B00100100,B00101011,B11111111,B11111100,B00000000,B00000000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B11001010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000101,B00000000,B00000000,B00000000,B00000000,B00001010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000100,B11111111,B11111111,B11111111,B11111111,B11110010,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B00000000,B00000000,B00000000,B00000000,B00000100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
const byte menu2[] PROGMEM = {88,49,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B00000000,B00001110,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000111,B00000000,B00011001,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111001,B10000000,B00010111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B10000000,B00110111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B11000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B00000000,B00000111,B11000000,B00000001,B11110000,B00000000,B01111100,B00000000,B00011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B01111111,B11110111,B11011111,B11111101,B11110111,B11111111,B01111101,B11111111,B11011111,B01000000,B00101111,B00000000,B00000111,B11000000,B00000001,B11110000,B00000000,B01111100,B00000000,B00011111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000111,B11111111,B11111111,B01000000,B00101111,B11111111,B11111101,B11111111,B11111111,B11111111,B11111111,B11111011,B11111111,B11111111,B01000000,B00110111,B11111111,B11111011,B00000000,B00000000,B00000000,B00000000,B00001101,B11111111,B11111110,B11000000,B00010111,B11111111,B11111010,B11111111,B11111111,B11111111,B11111111,B11110101,B11111111,B11111110,B10000000,B00011001,B11111111,B11111010,B10001111,B11111111,B11111101,B11111111,B11110101,B11111111,B11111001,B10000000,B00001110,B00000000,B00000010,B11011001,B10101100,B10011000,B11011001,B01010100,B00000000,B00000111,B00000000,B00000011,B11111111,B11111110,B11011010,B10101001,B10101101,B10101011,B00010111,B11111111,B11111100,B00000000,B00000000,B00000000,B00000010,B10001010,B11011100,B10101101,B11011011,B11010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B11111111,B11111111,B11111111,B11111111,B00110100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000010,B11111111,B11111111,B11111111,B11111111,B11110100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000011,B00000000,B00000000,B00000000,B00000000,B00001100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000001,B11111111,B11111111,B11111111,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,};
const byte key[] PROGMEM = {16,21,B11111111,B11111000,B10000000,B00001000,B10000000,B00001000,B10000000,B00001000,B10000001,B11001000,B10000001,B01001000,B10001011,B11001000,B10010111,B00001000,B10001110,B00001000,B10001100,B00001000,B10000000,B00001000,B10000000,B00001000,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B00000000,B01010011,B01010000,B01100110,B01110000,B01010011,B00010000,B00000000,B01100000,};
const byte key2[] PROGMEM = {16,21,B11111111,B11111000,B10000000,B00001000,B10000000,B00001000,B10000000,B00001000,B10000001,B11001000,B10000001,B01001000,B10001011,B11001000,B10010111,B00001000,B10001110,B00001000,B10001100,B00001000,B10000000,B00001000,B10000000,B00001000,B11111111,B11111000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01000000,B00000000,B01010011,B01010000,B01100110,B01110000,B01010011,B00010000,B00000000,B01100000,};
const byte sox[] PROGMEM = {16,21,B01111111,B11111100,B01000000,B00000100,B01000000,B00000100,B01000001,B11100100,B01000001,B00100100,B01000001,B11100100,B01000111,B00100100,B01001000,B00100100,B01001000,B01000100,B01000111,B10000100,B01000000,B00000100,B01000000,B00000100,B01111111,B11111100,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B01100000,B00001000,B10000100,B01101010,B00101010,B10001100,B11000100,B01101010,B00000000,B00000000,};
if(S1==0 && S2==0 && S3==0 && S4==0){Active_slot = 1;}
else if(S1==1 && S2==0 && S3==0 && S4==0){Active_slot = 2;}
else if(S1==1 && S2==1 && S3==0 && S4==0){Active_slot = 3;}
else if(S1==1 && S2==1 && S3==1 && S4==0){Active_slot = 4;}
else if(S1==1 && S2==1 && S3==1 && S4==1){Active_slot = 0;}
else if(S1==1 && S2==0 && S3==1 && S4==0){Active_slot = 2;}
else if(S1==1 && S2==0 && S3==1 && S4==1){Active_slot = 2;}
else if(S1==1 && S2==0 && S3==0 && S4==1){Active_slot = 2;}
else if(S1==1 && S2==1 && S3==0 && S4==1){Active_slot = 3;}
else if(S1==0 && S2==1 && S3==0 && S4==0){Active_slot = 1;}
else if(S1==0 && S2==1 && S3==1 && S4==0){Active_slot = 1;}
else if(S1==0 && S2==1 && S3==1 && S4==1){Active_slot = 1;}
else if(S1==0 && S2==1 && S3==0 && S4==1){Active_slot = 1;}
else if(S1==0 && S2==0 && S3==1 && S4==0){Active_slot = 1;}
else if(S1==0 && S2==0 && S3==1 && S4==1){Active_slot = 1;}
else if(S1==0 && S2==0 && S3==0 && S4==1){Active_slot = 1;}
if (narrative != 1 && narrative != 2 && (gb.buttons.pressed(BTN_C))){
menu_1 ++;}
if(menu_1 == 3){
scroll1 = 1;
gb.display.setColor(BLACK);
gb.display.drawBitmap(0,menuy,menu1);
gb.display.setColor(WHITE);
gb.display.drawBitmap(0,menuy,menu2);
gb.display.setColor(BLACK);}
else if(menu_1 >= 5){
scroll1 =2;
gb.display.setColor(BLACK);
gb.display.drawBitmap(0,menuy,menu1);
gb.display.setColor(WHITE);
gb.display.drawBitmap(0,menuy,menu2);
gb.display.setColor(BLACK);
}
if((menu_1 == 3 && key_1 == 3 && Active_slot==1) || (menu_1 == 5 && key_1 == 3 && Active_slot==1)){gb.display.drawBitmap(key_loc,keyy,key);}
if((menu_1 == 3 && key_1 == 3 && Active_slot==2) || (menu_1 == 5 && key_1 == 3 && Active_slot==2)){gb.display.drawBitmap(key_loc,keyy,key);}
if((menu_1 == 3 && key_1 == 3 && Active_slot==3) || (menu_1 == 5 && key_1 == 3 && Active_slot==3)){gb.display.drawBitmap(key_loc,keyy,key);}
if((menu_1 == 3 && key_1 == 3 && Active_slot==4) || (menu_1 == 5 && key_1 == 3 && Active_slot==4)){gb.display.drawBitmap(key_loc,keyy,key);}
if(keyslot==1 && gb.buttons.pressed(BTN_B)){key_1 = 5, S1 = 0, keyslot=0 ;} //////test remove item key
if(keyslot==2 && gb.buttons.pressed(BTN_B)){key_1 = 5, S2 = 0, keyslot=0 ;}
if(keyslot==3 && gb.buttons.pressed(BTN_B)){key_1 = 5, S3 = 0, keyslot=0 ;}
if(keyslot==4 && gb.buttons.pressed(BTN_B)){key_1 = 5, S4 = 0, keyslot=0 ;}
if((menu_1 == 3 && key_2 == 3 && Active_slot==1) || (menu_1 == 5 && key_2 == 3 && Active_slot==1)){gb.display.drawBitmap(key2_loc,keyy,key2);}
if((menu_1 == 3 && key_2 == 3 && Active_slot==2) || (menu_1 == 5 && key_2 == 3 && Active_slot==2)){gb.display.drawBitmap(key2_loc,keyy,key2);}
if((menu_1 == 3 && key_2 == 3 && Active_slot==3) || (menu_1 == 5 && key_2 == 3 && Active_slot==3)){gb.display.drawBitmap(key2_loc,keyy,key2);}
if((menu_1 == 3 && key_2 == 3 && Active_slot==4) || (menu_1 == 5 && key_2 == 3 && Active_slot==4)){gb.display.drawBitmap(key2_loc,keyy,key2);}
//if(keyslot2==1 && gb.buttons.pressed(BTN_B)){key_1 = 5, S1 = 0, keyslot2=0 ;} //////test remove item key
//if(keyslot2==2 && gb.buttons.pressed(BTN_B)){key_1 = 5, S2 = 0, keyslot2=0 ;}
//if(keyslot2==3 && gb.buttons.pressed(BTN_B)){key_1 = 5, S3 = 0, keyslot2=0 ;}
//if(keyslot2==4 && gb.buttons.pressed(BTN_B)){key_1 = 5, S4 = 0, keyslot2=0 ;}
if((menu_1 == 3 && sox_1 == 3 && Active_slot==1) || (menu_1 == 5 && sox_1 == 3 && Active_slot==1)){gb.display.drawBitmap(sox_loc,keyy,sox);}
if((menu_1 == 3 && sox_1 == 3 && Active_slot==2) || (menu_1 == 5 && sox_1 == 3 && Active_slot==2)){gb.display.drawBitmap(sox_loc,keyy,sox);}
if((menu_1 == 3 && sox_1 == 3 && Active_slot==3) || (menu_1 == 5 && sox_1 == 3 && Active_slot==3)){gb.display.drawBitmap(sox_loc,keyy,sox);}
if((menu_1 == 3 && sox_1 == 3 && Active_slot==4) || (menu_1 == 5 && sox_1 == 3 && Active_slot==4)){gb.display.drawBitmap(sox_loc,keyy,sox);}
//if(soxslot==1 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S1 = 0;} //////test remove item sock
//if(soxslot==2 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S2 = 0;}
//if(soxslot==3 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S3 = 0;}
//if(soxslot==4 && gb.buttons.pressed(BTN_B)){sox_1 = 5, S4 = 0;}
if (scroll1 == 1 && menuy < 0){
menuy = menuy + 2; ////2 = menu speed down
keyy = keyy + 2;} ////2 = menu speed down
if (scroll1 == 2 && menuy > -84){
menuy = menuy - 2; ////2 = menu speed up
keyy = keyy - 2;} ////2 = menu speed up
if (menuy == -84 && scroll1 == 2){
menu_1 ++;}
if (menu_1 > 7){
menu_1 = 1;
scroll1 = 0;}
////PICKUP ITEMS/EMPTY LOCATIONS/////
else if((gb.display.solid[i].spritecol == houseB3) && room == 1 && key_1 == 1) {gb.popup(F(" ""It's locked!!"" "),20); return true;}
else if((gb.display.solid[i].spritecol == houseB3) && room == 6) {gb.popup(F(" ""It's locked!!"" "),20); return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S1=1, key_loc=8, keyslot=1; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S2=1, key_loc=26, keyslot=2 ; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S3=1, key_loc=44, keyslot=3; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 1 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && key_1 == 1) {gb.popup(F(" ""You got key"" "),20); key_1 = 3, S4=1, key_loc=62, keyslot=4; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 1 && gb.buttons.pressed(BTN_A) && key_1 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
//else if(gb.display.solid[i].spritecol == chest) return true;
else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S1=1, key2_loc=8, keyslot2=1; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S2=1, key2_loc=26, keyslot2=2 ; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S3=1, key2_loc=44, keyslot2=3; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 5 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && key_2 == 1) {gb.popup(F(" ""You got key"" "),20); key_2 = 3, S4=1, key2_loc=62, keyslot2=4; return true;}
else if((gb.display.solid[i].spritecol == chest) && room == 5 && gb.buttons.pressed(BTN_A) && key_2 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
else if(gb.display.solid[i].spritecol == chest) return true;
else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 1 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S1=1, sox_loc=7, soxslot=1; return true;}
else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 2 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S2=1, sox_loc=25, soxslot=1; return true;}
else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 3 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S3=1, sox_loc=43, soxslot=1; return true;}
else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && Active_slot == 4 && gb.buttons.pressed(BTN_A) && sox_1 == 1) {gb.popup(F(" ""You got a sock?"" "),20); sox_1 = 3, S4=1, sox_loc=61, soxslot=1; return true;}
else if((gb.display.solid[i].spritecol == bedsidebottom) && room == 5 && gb.buttons.pressed(BTN_A) && sox_1 > 1) {gb.popup(F(" ""It's empty!!"" "),20); return true;}
else if(gb.display.solid[i].spritecol == bedsidebottom) return true;
Edit::: ok I understand the slot layout and can probably expand it on my own. I just don't understand how the slots are located in the bubble and how to place something in the slot in the bubble.
Last edited: