From 5001fa194c820422dd5de2dd655c17bde131e1cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Aug 2013 11:40:12 +0300 Subject: add support for giving item to npc (evol only) chancge network version to 9. --- src/gui/npcdialog.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/gui/npcdialog.h') diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index 815bc7564..9e4de0907 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -40,7 +40,9 @@ class Button; class BrowserBox; class ExtendedListBox; class ItemLinkHandler; +class Inventory; class IntTextField; +class ItemContainer; class NpcDialog; class PlayerBox; class ScrollArea; @@ -161,6 +163,8 @@ class NpcDialog final : public Window, void integerRequest(const int defaultValue = 0, const int min = 0, const int max = 2147483647); + void itemRequest(); + void move(const int amount); void setVisible(bool visible) override; @@ -227,6 +231,8 @@ class NpcDialog final : public Window, void placeIntInputControls(); + void placeItemInputControls(); + int mNpcId; int mDefaultInt; @@ -255,16 +261,22 @@ class NpcDialog final : public Window, // Used for the button Button *mButton; Button *mButton2; + Button *mButton3; // Will reset the text and integer input to the provided default Button *mResetButton; + Inventory *mInventory; + ItemContainer *mItemContainer; + ScrollArea *mItemScrollArea; + enum NpcInputState { NPC_INPUT_NONE = 0, NPC_INPUT_LIST, NPC_INPUT_STRING, - NPC_INPUT_INTEGER + NPC_INPUT_INTEGER, + NPC_INPUT_ITEM }; enum NpcActionState -- cgit v1.2.3-60-g2f50