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:
Mark de Wever 2011-02-20 09:05:58 +00:00
parent c33b4beb16
commit 2dc8c91a61
5 changed files with 11 additions and 5 deletions

View file

@ -68,6 +68,9 @@
[progress_bar]
id = "hour_percentage"
tooltip = "Hours in percent."
help = "The full range of the bar is 24 hours."
[/progress_bar]
[/column]

View file

@ -17,6 +17,7 @@
#include "gui/dialogs/debug_clock.hpp"
#include "gui/dialogs/dialog.hpp"
#include "gui/widgets/integer_selector.hpp"
#include "gui/widgets/window.hpp"
#include "gui/widgets/settings.hpp"

View file

@ -16,7 +16,7 @@
#ifndef 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"
@ -28,11 +28,11 @@ class tinteger_selector_;
/** Clock to test the draw events. */
class tdebug_clock
: public tdialog
: public tpopup
{
public:
tdebug_clock()
: tdialog()
: tpopup()
, hour_percentage_(NULL)
, minute_percentage_(NULL)
, second_percentage_(NULL)

View file

@ -392,7 +392,7 @@ void ttitle_screen::show_debug_clock_window(CVideo& video)
debug_clock_ = 0;
} else {
debug_clock_ = new tdebug_clock();
debug_clock_->show_tooltip(video);
debug_clock_->show(video, true);
}
}

View file

@ -20,6 +20,8 @@
namespace gui2 {
class tpopup;
/** Do we wish to show the button for the debug clock. */
extern bool show_debug_clock_button;
@ -76,7 +78,7 @@ private:
unsigned long logo_timer_id_;
/** Holds the debug clock dialog. */
tdialog* debug_clock_;
tpopup* debug_clock_;
/**
* Updates the tip of day widget.