class IGameDef;
class InventoryManager;
+class ISimpleTextureSource;
typedef enum {
f_Button,
gui::IGUIElement* parent, s32 id,
IMenuManager *menumgr,
InventoryManager *invmgr,
- IGameDef *gamedef
+ IGameDef *gamedef,
+ ISimpleTextureSource *tsrc
);
~GUIFormSpecMenu();
m_allowclose = value;
}
- void useGettext(bool value) {
- m_use_gettext = true;
- }
-
void lockSize(bool lock,v2u32 basescreensize=v2u32(0,0)) {
m_lock = lock;
m_lockscreensize = basescreensize;
}
void removeChildren();
+ void setInitialFocus();
/*
Remove and re-add (or reposition) stuff
*/
void updateSelectedItem();
ItemStack verifySelectedItem();
- void acceptInput();
+ void acceptInput(bool quit);
+ bool preprocessEvent(const SEvent& event);
bool OnEvent(const SEvent& event);
int getListboxIndex(std::string listboxname);
irr::IrrlichtDevice* m_device;
InventoryManager *m_invmgr;
IGameDef *m_gamedef;
+ ISimpleTextureSource *m_tsrc;
std::string m_formspec_string;
InventoryLocation m_current_inventory_location;
gui::IGUIStaticText *m_tooltip_element;
bool m_allowclose;
- bool m_use_gettext;
bool m_lock;
v2u32 m_lockscreensize;
+
+ bool m_bgfullscreen;
+ bool m_slotborder;
+ bool m_clipbackground;
+ video::SColor m_bgcolor;
+ video::SColor m_slotbg_n;
+ video::SColor m_slotbg_h;
+ video::SColor m_slotbordercolor;
private:
typedef struct {
v2s32 size;
v2s32 basepos;
int bp_set;
v2u32 screensize;
+ std::wstring focused_fieldname;
std::map<std::wstring,int> listbox_selections;
std::map<std::wstring,int> listbox_scroll;
} parserData;
bool key_escape;
} fs_key_pendig;
- std::vector<video::ITexture *> m_Textures;
-
fs_key_pendig current_keys_pending;
// Determine whether listbox click was double click
void parseItemImageButton(parserData* data,std::string element);
void parseTabHeader(parserData* data,std::string element);
void parseBox(parserData* data,std::string element);
+ void parseBackgroundColor(parserData* data,std::string element);
+ void parseListColors(parserData* data,std::string element);
- bool parseColor(std::string color, irr::video::SColor& outcolor);
+ bool parseColor(std::string &value, video::SColor &color, bool quiet);
};
class FormspecFormSource: public IFormSource