Fixing the clock and adding new signals
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "minefield.hpp"
|
||||
#include "gdkmm/pixbuf.h"
|
||||
#include <memory>
|
||||
#include <gtkmm.h>
|
||||
#include <glibmm.h>
|
||||
#include <gdkmm.h>
|
||||
#include <sigc++/sigc++.h>
|
||||
#include <gtkmm-4.0/gtkmm/gestureclick.h>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
#define PROJECT_NAME "minesweeper"
|
||||
|
||||
@@ -24,18 +24,20 @@ class MainWindow : public Gtk::Window
|
||||
Gtk::Label flagLabel;
|
||||
Gtk::Label clockLabel;
|
||||
MineField field {16, 16, 40};
|
||||
int elapsedTime;
|
||||
int m_elapsedTime;
|
||||
bool newGame;
|
||||
std::shared_ptr<Gdk::Pixbuf> m_pixbufBomb;
|
||||
std::shared_ptr<Gdk::Pixbuf> m_pixbufFlag;
|
||||
std::shared_ptr<Gdk::Pixbuf> m_pixbufFlagBomb;
|
||||
std::shared_ptr<Gdk::Texture> m_textureBomb;
|
||||
std::shared_ptr<Gdk::Texture> m_textureFlag;
|
||||
std::shared_ptr<Gdk::Texture> m_textureFlagBomb;
|
||||
void updateCell(int x, int y);
|
||||
void openBombs();
|
||||
void updateFlagsLabel(int flags);
|
||||
|
||||
// sigc::connection clockConn;
|
||||
bool updateClockLabel();
|
||||
void gameWon();
|
||||
void gameOver();
|
||||
sigc::connection clockSignalConn;
|
||||
// void OpenNearCells(int index);
|
||||
// void Explode();
|
||||
// void Explode();xo
|
||||
// bool AllCellsOpened();
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user