Release 1.0.0: rename to NoMines, add leaderboard, theme support and release metadata
- Rename app/binary/app-id to nomines (io.github.bemagri.nomines), config dir moves to ~/.config/nomines with legacy path fallback - Add persistent best-time leaderboard (Glib::KeyFile) - Theme-aware board following system light/dark preference - Beveled 3D cells, confetti win animation, keyboard shortcuts, right-click chording, per-difficulty window sizing - Add AppStream metainfo, validate desktop file and metainfo via meson tests - Fix license metadata to GPL-3.0-or-later and real homepage
This commit is contained in:
+15
-2
@@ -2,8 +2,11 @@
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include "minefield.hpp"
|
||||
#include "board_widget.hpp"
|
||||
#include "leaderboard.hpp"
|
||||
|
||||
class MainWindow : public Gtk::ApplicationWindow {
|
||||
public:
|
||||
@@ -14,12 +17,13 @@ private:
|
||||
// UI Setup
|
||||
void setup_header_bar();
|
||||
void setup_board();
|
||||
void refresh_leaderboard();
|
||||
|
||||
// Actions
|
||||
void start_new_game(const GameDifficulty& difficulty);
|
||||
void on_game_state_changed();
|
||||
bool on_timer_tick();
|
||||
void show_game_over_dialog(bool won);
|
||||
void show_game_over_dialog(bool won, bool new_best, int seconds);
|
||||
|
||||
// Widgets
|
||||
Gtk::HeaderBar header_bar_;
|
||||
@@ -27,14 +31,23 @@ private:
|
||||
Gtk::MenuButton btn_difficulty_;
|
||||
Gtk::Popover menu_difficulty_;
|
||||
Gtk::Box box_difficulty_; // Content for popover
|
||||
|
||||
std::vector<std::pair<GameDifficulty, Gtk::CheckButton*>> difficulty_buttons_;
|
||||
|
||||
Gtk::MenuButton btn_leaderboard_;
|
||||
Gtk::Popover menu_leaderboard_;
|
||||
Gtk::Box box_leaderboard_; // Content for popover
|
||||
|
||||
Gtk::Label lbl_time_;
|
||||
Gtk::Label lbl_flags_;
|
||||
|
||||
BoardWidget board_widget_;
|
||||
|
||||
Leaderboard leaderboard_;
|
||||
|
||||
// Game State
|
||||
std::shared_ptr<Minefield> minefield_;
|
||||
sigc::connection timer_conn_;
|
||||
sigc::connection dialog_timeout_conn_;
|
||||
GameDifficulty current_difficulty_ = Minefield::DifficultyEasy;
|
||||
Gtk::MessageDialog* game_over_dialog_ = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user