Make adjustments
This commit is contained in:
parent
7fb70bed6f
commit
8e751b2b7d
|
@ -39,6 +39,11 @@ MineSweeper::MineSweeper()
|
|||
// Create Scores Window
|
||||
scores_win = ScoresWin::create();
|
||||
|
||||
// Bind windows
|
||||
input_dialog->set_transient_for(*this);
|
||||
scores_win->set_transient_for(*this);
|
||||
input_dialog->set_scores_window(scores_win);
|
||||
|
||||
// Show everything
|
||||
add(main_box);
|
||||
show_all_children();
|
||||
|
@ -251,9 +256,6 @@ void MineSweeper::check_mines(int pos_x, int pos_y)
|
|||
mytimer.disconnect();
|
||||
|
||||
// Save the time of game
|
||||
input_dialog->set_transient_for(*this);
|
||||
scores_win->set_transient_for(*this);
|
||||
input_dialog->set_scores_window(scores_win);
|
||||
input_dialog->set_game_time(timer_count);
|
||||
input_dialog->show_all();
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ ScoresWin::ScoresWin(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &
|
|||
: Gtk::Window(cobject),
|
||||
ref_builder(ref_Glade)
|
||||
{
|
||||
|
||||
// Get Widgets
|
||||
ref_builder->get_widget("btnclose", btnclose);
|
||||
btnclose->signal_clicked().connect(sigc::mem_fun(*this, &ScoresWin::hide));
|
||||
}
|
||||
|
||||
ScoresWin *ScoresWin::create()
|
||||
|
|
|
@ -10,4 +10,8 @@ class ScoresWin : public Gtk::Window{
|
|||
|
||||
private:
|
||||
Glib::RefPtr<Gtk::Builder> ref_builder;
|
||||
|
||||
// Child widgets
|
||||
Gtk::Button *btnclose;
|
||||
Gtk::TreeView *tree_view;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue