26 #ifndef MAKE7LIBRE_GAME_H__ 27 #define MAKE7LIBRE_GAME_H__ 50 void display (Glib::RefPtr<Gtk::Application> app);
71 void merge_hexas (
int newHexa, std::list<int> oldHexas);
116 *
w, *
m, *
e, *
ee, *
sww,*
sw, *
se, *
see, *
ssw, *
ss, *
sse,
134 #endif // MAKE7LIBRE_GAME_H__ void big_badaboom(std::list< int > hexas)
Erase all hexas around three (or more) matching "7" hexas.
int get_pos2()
Returns pos2 (not very useful)
int get_neighbour(int rel, int givenRef)
Calculates the position of a neighbor button.
Gtk::Window * make7window
Gtk::AboutDialog * make7credits
Gtk::Button * button_quit
Glib::ustring get_config_file()
Create config file if it doesn't exist, then return its path.
Gtk::MessageDialog * make7message
Gtk::Button * button_credits
void on_display_help_activate()
Signal function activated by button_help.
void set_main_hexa(Glib::ustring Snum)
Put the string to the label of the main hexa in SelectionArea.
bool triggers(int ref)
Deal with a new hexa on the board.
void import_every_widget()
Function containing a lot of lines too.
std::map< int, Glib::ustring > Colors
std::map< int, Gtk::Button * > Board
std::map< int, Glib::ustring > BoardSnapshotMap
void on_close_scores_activate()
Signal function activated by button_close_scores.
void reset_board()
Erase values and colors of all hexas on the Board.
void get_random_hexas()
Generate random numbers and fill valHexa1 and valHexa2 with them.
void game_button_selected(int ref)
Called when any Board button is clicked.
std::list< int > SelectionAreaKeys
Gtk::HeaderBar * headerbar
Gtk::MessageDialog * make7confirm
int refresh_score()
Update the amount of points in the score label.
Gtk::Button * button_rotate
void refresh_selection_area()
Re-display the content of the SelectionArea.
std::map< int, Gtk::Button * > SelectionArea
Gtk::MessageDialog * make7askname
Glib::ustring get_main_hexa()
Returns the value of the main hexa button label.
Gtk::ToggleButton * button_erase
void on_quit_game_activate()
Signal function activated by button_quit.
Glib::ustring oldValHexa2
void display_error(int i)
Spawns a Gtk::MessageDialog containing an appropriated message.
void connect_every_button()
Function containing a lot of lines.
Gtk::Label * current_score
void erase_hexa(int ref)
Erase value and color of the given hexa.
void get_scores()
Read users scores from saved file.
std::list< int > BoardKeys
Gtk::Button * button_save
Gtk::Button * button_scores
bool get_confirmation()
Ask user to confirm the quitting.
std::list< int > ColorsKeys
void merge_hexas(int newHexa, std::list< int > oldHexas)
Erase values and colors of matching neighbors.
Glib::ustring get_second_hexa()
Same as get_main_hexa () but with the second.
bool rotate_hexas_right(GdkEventButton *event)
Signal function activated when user right-clicks on main hexa.
Main class contains the graphical interface (set by Glade and imported with Gtk::Builder) and the mai...
void set_second_hexa(Glib::ustring Snum)
Same as set_main_hexa (), but with the second.
void reset_snapshot()
Re-display an old configuration of Board and SelectionArea, using the std::map created by get_snapsho...
void rotate_hexas_left()
Signal function activated when user left-clicks on main hexa.
Gtk::Window * make7scores
Glib::RefPtr< Gtk::CssProvider > CssProvider
void set_pos2(int givenPos2)
Set pos2 to the given value (not very useful)
void on_cancel_action_activate()
Signal function activated by button_cancel.
void write_scores()
Save the score in a file.
void launch_game()
All initializations needed at the beginning of a new game.
Gtk::Button * button_cancel
void reset_selection_area()
Erase values and colors of all hexas on the SelectionArea.
bool on_make7window_hide(_GdkEventAny *event)
Signal function activated when user wants to quit.
void define_hexa(int ref, Glib::ustring valref)
Define the new hexa then check neighbors while there are.
Gtk::Button * button_help
Gtk::Button * button_next
bool scan_neighbours(int ref, std::list< int > &oldRefs)
Check if the neighbors of a given hexa have the same value as it.
void on_new_game_activate()
Signal function activated by button_new.
void on_entry_editing_done()
Activates button_apply_save when user hits 'Enter'.
void update_hexa_color(int hexa)
Change the color of a given hexa.
void display(Glib::RefPtr< Gtk::Application > app)
Here is actually displayed the window.
Gtk::Button * button_close_scores
void on_next_hexa_activate()
Signal function activated by button_next.
void on_display_credits_activate()
Signal function activated by button_credits.
void on_display_scores_activate()
Signal function activated by button_scores.
Glib::ustring oldValHexa1
Gtk::MessageDialog * make7error_board
std::map< int, Glib::ustring > get_board_snapshot()
Backup the whole Board and SelectionArea in a std::map.