diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 155c22f..9cda1c1 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index d057e01..cd97819 100644 --- a/main.cpp +++ b/main.cpp @@ -166,13 +166,11 @@ int EQUIP_ITEM_MENU_CURSOR=0; int EQUIP_ITEM_MENU_OFFSET=0; std::vector EQUIP_ITEM_MENU_CONTENTS={}; std::vector> SHOP_MENU_CONTENTS={}; -std::array MESSAGE_BOX_DIALOG_ANSWERS={-1}; +int MESSAGE_BOX_DIALOG_ANSWER=-1; int MESSAGE_BOX_DIALOG_CHOICES_MADE=0; std::vector MESSAGE_BOX_CHOICE_LIST={}; bool waitingForChoice=false; int MESSAGE_BOX_DIALOG_CHOICE_CURSOR=0; -bool insideChoice=false; -bool selectionMade=false; /* [Choice1,Choice2,Choice3] @@ -192,10 +190,6 @@ void DisplayMessageBox(std::string targetT) { messageBoxMarker=0; messageBoxStartMarker=0; messageBoxStopMarker=0; - for (int i=0;i') { messageBoxMarker++; int counter=0; diff --git a/object.h b/object.h index dc0dcba..21a4845 100644 --- a/object.h +++ b/object.h @@ -180,12 +180,22 @@ class TrashCan_Obj : public Object{ return {{"You dig around the trash can.","Nope! Just looks like plain ol' trash."}};} }; +extern int MESSAGE_BOX_DIALOG_ANSWER; + class Shopkeeper_Obj : public Object{ DynamicObject(Shopkeeper_Obj) std::vector> itemList; - std::string welcomeMessage="Welcome! Please choose an option: [BUY,SELL]>0:Please take a look through our wares.>1:What would you like to sell?<"; + std::string welcomeMessage="Welcome! Please choose an option: [BUY,SELL,FDSAJIVDSAJ]\ + >0:Please take a look through our wares.\ + >1:What would you like to sell?\ + >2:Are you okay?<"; Interaction Interact()override{ - return {{welcomeMessage}}; + if (MESSAGE_BOX_DIALOG_ANSWER==2) { + MESSAGE_BOX_DIALOG_ANSWER=0; + return {{"No! Stay away!"}}; + } else { + return {{welcomeMessage}}; + } } }; #endif \ No newline at end of file