diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index f94f7e7af..0604c7d5d 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -492,14 +492,14 @@ CHint::CHint(const neutrino_locale_t Text, bool show_background, const char * co initHint(show_background); } -CLoaderHint::CLoaderHint(const char * const Text, bool show_background, const char * const Picon) : CHintBox(LOCALE_MESSAGEBOX_INFO, Text, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_INFO, Picon) +CLoaderHint::CLoaderHint(const char * const Text, bool show_background, const char * const Picon, bool enable_header) : CHintBox(LOCALE_MESSAGEBOX_INFO, Text, HINTBOX_MIN_WIDTH, NEUTRINO_ICON_INFO, Picon) { - initHint(show_background); + initHint(show_background, enable_header); } -CLoaderHint::CLoaderHint(const neutrino_locale_t Text, bool show_background, const char * const Picon) : CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(Text), HINTBOX_MIN_WIDTH, NEUTRINO_ICON_INFO, Picon) +CLoaderHint::CLoaderHint(const neutrino_locale_t Text, bool show_background, const char * const Picon, bool enable_header) : CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(Text), HINTBOX_MIN_WIDTH, NEUTRINO_ICON_INFO, Picon) { - initHint(show_background); + initHint(show_background, enable_header); } int ShowHintS(const char * const Text, int timeout, bool show_background, const char * const Picon) diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index c16ad2020..ed6efa271 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -400,7 +400,7 @@ class CHint : public CHintBox }; }; -//! Sub class of CHintBox. Shows a simplified hint as a text hint without footer. +//! Sub class of CHintBox. Shows a simplified hint as a text hint without footer and optional header. /*! CLoaderHint provides a small window with header and text item, optional disable/enable background, picon and delay @@ -411,10 +411,10 @@ class CLoaderHint : public CHintBox private: int delay; - void initHint(bool enable_bg) + void initHint(bool enable_bg, bool enable_header) { paint_bg = enable_bg; - ccw_show_header = true; + ccw_show_header = enable_header; ccw_show_footer = false; cc_item_type.name = "wg.hint"; delay = 1; @@ -426,17 +426,19 @@ class CLoaderHint : public CHintBox * @param[in] show_background * @li optional: expects type bool, enable/disable background paint, default = true * @param[in] Picon - * @li optional: expects type std::string, defines the picon name on the left side of message text, default = NEUTRINO_ICON_LOADER\n + * @li optional: expects type std::string, defines the picon name on the left side of message text, default = NEUTRINO_ICON_LOADER + * @param[in] enable_header + * @li optional: expects type bool, enable or disable header for message window, default = false * @see CHourGlass() */ - CLoaderHint(const char * const Text, bool show_background = true, const char * const Picon = NEUTRINO_ICON_LOADER); + CLoaderHint(const char * const Text, bool show_background = true, const char * const Picon = NEUTRINO_ICON_LOADER, bool enable_header = false); /**Overloaded localized CLoaderHint Constructor * @param[in] Text * @li expects type neutrino_locale_t, this is the message text inside the window, text is UTF-8 encoded * @see for other parameters: CLoaderHint() */ - CLoaderHint(const neutrino_locale_t Text, bool show_background = true, const char * const Picon = NEUTRINO_ICON_LOADER); + CLoaderHint(const neutrino_locale_t Text, bool show_background = true, const char * const Picon = NEUTRINO_ICON_LOADER, bool enable_header = false); virtual void setDelay(int d) {delay = d;}