Convert the debug clock to a non modal dialog.
This is just a test case also enables a helptip for the hour progress bar.
This commit is contained in:
parent
c33b4beb16
commit
2dc8c91a61
5 changed files with 11 additions and 5 deletions
|
@ -68,6 +68,9 @@
|
||||||
|
|
||||||
[progress_bar]
|
[progress_bar]
|
||||||
id = "hour_percentage"
|
id = "hour_percentage"
|
||||||
|
|
||||||
|
tooltip = "Hours in percent."
|
||||||
|
help = "The full range of the bar is 24 hours."
|
||||||
[/progress_bar]
|
[/progress_bar]
|
||||||
|
|
||||||
[/column]
|
[/column]
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "gui/dialogs/debug_clock.hpp"
|
#include "gui/dialogs/debug_clock.hpp"
|
||||||
|
|
||||||
|
#include "gui/dialogs/dialog.hpp"
|
||||||
#include "gui/widgets/integer_selector.hpp"
|
#include "gui/widgets/integer_selector.hpp"
|
||||||
#include "gui/widgets/window.hpp"
|
#include "gui/widgets/window.hpp"
|
||||||
#include "gui/widgets/settings.hpp"
|
#include "gui/widgets/settings.hpp"
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef GUI_DIALOGS_DEBUG_CLOCK_HPP_INCLUDED
|
#ifndef GUI_DIALOGS_DEBUG_CLOCK_HPP_INCLUDED
|
||||||
#define GUI_DIALOGS_DEBUG_CLOCK_HPP_INCLUDED
|
#define GUI_DIALOGS_DEBUG_CLOCK_HPP_INCLUDED
|
||||||
|
|
||||||
#include "gui/dialogs/dialog.hpp"
|
#include "gui/dialogs/popup.hpp"
|
||||||
|
|
||||||
#include "gui/auxiliary/event/dispatcher.hpp"
|
#include "gui/auxiliary/event/dispatcher.hpp"
|
||||||
|
|
||||||
|
@ -28,11 +28,11 @@ class tinteger_selector_;
|
||||||
|
|
||||||
/** Clock to test the draw events. */
|
/** Clock to test the draw events. */
|
||||||
class tdebug_clock
|
class tdebug_clock
|
||||||
: public tdialog
|
: public tpopup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
tdebug_clock()
|
tdebug_clock()
|
||||||
: tdialog()
|
: tpopup()
|
||||||
, hour_percentage_(NULL)
|
, hour_percentage_(NULL)
|
||||||
, minute_percentage_(NULL)
|
, minute_percentage_(NULL)
|
||||||
, second_percentage_(NULL)
|
, second_percentage_(NULL)
|
||||||
|
|
|
@ -392,7 +392,7 @@ void ttitle_screen::show_debug_clock_window(CVideo& video)
|
||||||
debug_clock_ = 0;
|
debug_clock_ = 0;
|
||||||
} else {
|
} else {
|
||||||
debug_clock_ = new tdebug_clock();
|
debug_clock_ = new tdebug_clock();
|
||||||
debug_clock_->show_tooltip(video);
|
debug_clock_->show(video, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
namespace gui2 {
|
namespace gui2 {
|
||||||
|
|
||||||
|
class tpopup;
|
||||||
|
|
||||||
/** Do we wish to show the button for the debug clock. */
|
/** Do we wish to show the button for the debug clock. */
|
||||||
extern bool show_debug_clock_button;
|
extern bool show_debug_clock_button;
|
||||||
|
|
||||||
|
@ -76,7 +78,7 @@ private:
|
||||||
unsigned long logo_timer_id_;
|
unsigned long logo_timer_id_;
|
||||||
|
|
||||||
/** Holds the debug clock dialog. */
|
/** Holds the debug clock dialog. */
|
||||||
tdialog* debug_clock_;
|
tpopup* debug_clock_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the tip of day widget.
|
* Updates the tip of day widget.
|
||||||
|
|
Loading…
Add table
Reference in a new issue