+struct button_info {
+ float repeatcounter;
+ float repeatdelay;
+ irr::EKEY_CODE keycode;
+ std::vector<int> ids;
+ IGUIButton* guibutton;
+ bool immediate_release;
+};
+
+class AutoHideButtonBar
+{
+public:
+
+ AutoHideButtonBar( IrrlichtDevice *device, IEventReceiver* receiver );
+
+ void init(ISimpleTextureSource* tsrc, const char* starter_img,
+ int button_id, v2s32 UpperLeft, v2s32 LowerRight,
+ autohide_button_bar_dir dir, float timeout);
+
+ ~AutoHideButtonBar();
+
+ /* add button to be shown */
+ void addButton(touch_gui_button_id id, const wchar_t* caption,
+ const char* btn_image);
+
+ /* detect settings bar button events */
+ bool isButton(const SEvent &event);
+
+ /* handle released hud buttons */
+ bool isReleaseButton(int eventID);
+
+ /* step handler */
+ void step(float dtime);
+
+ /* deactivate button bar */
+ void deactivate();
+
+ /* hide the whole buttonbar */
+ void hide();
+
+ /* unhide the buttonbar */
+ void show();
+
+private:
+ ISimpleTextureSource* m_texturesource;
+ irr::video::IVideoDriver* m_driver;
+ IGUIEnvironment* m_guienv;
+ IEventReceiver* m_receiver;
+ v2u32 m_screensize;
+ button_info m_starter;
+ std::vector<button_info*> m_buttons;
+
+ v2s32 m_upper_left;
+ v2s32 m_lower_right;
+
+ /* show settings bar */
+ bool m_active;
+
+ bool m_visible;
+
+ /* settings bar timeout */
+ float m_timeout;
+ float m_timeout_value;
+ bool m_initialized;
+ autohide_button_bar_dir m_dir;
+};
+