Skip to content

Commit

Permalink
Add 24game
Browse files Browse the repository at this point in the history
  • Loading branch information
daleclack committed Apr 21, 2022
1 parent 63bfda7 commit ced2d49
Show file tree
Hide file tree
Showing 11 changed files with 990 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Gtkmm3_Mac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
include_directories(.)
include_directories(..)
include_directories(src/core src/ui src/apps src/panels src/image_app)
include_directories(src/core src/ui src/apps src/panels src/image_app src/game24_app)

find_package (PkgConfig REQUIRED)
pkg_check_modules (GTKMM3 REQUIRED gtkmm-3.0)
Expand All @@ -25,6 +25,7 @@ link_directories (${GTKMM3_LIBRARY_DIRS})
set(SOURCES src/core/main.cc src/core/MyWin.cc src/core/MyStack.cc src/cfgfile/cfgfile.cc
src/ui/MyFinder.cc src/ui/MyPrefs.cc src/ui/MyDock.cc
src/draw_app/drawing.cc src/file_app/FileWindow.cc src/game_app/Game.cc
src/game24_app/Game24.cc src/game24_app/Game24Win.cc
src/image_app/ImageApp.cc src/image_app/MyImage.cc
src/run_app/Runner.cc src/text_app/TextEditor.cc)

Expand All @@ -38,6 +39,7 @@ set(RESOURCE_LIST
STRIPBLANKS prefs_stack.ui
STRIPBLANKS mydock.ui
STRIPBLANKS game1.ui
STRIPBLANKS game24.ui
style.css
reset.css
dock_style.css
Expand All @@ -58,6 +60,8 @@ set(RESOURCE_LIST
icons/48x48/actions/game_running.png
icons/48x48/actions/btnabout.png
icons/48x48/actions/My_GtkUI.png
icons/scalable/status/24game.svg
icons/scalable/status/24game_running.svg
icons/scalable/status/audacious_whitesur.svg
icons/scalable/status/my_prefs.svg
icons/scalable/status/my_prefs_running.svg
Expand Down
389 changes: 389 additions & 0 deletions Gtkmm3_Mac/res/game24.ui

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions Gtkmm3_Mac/res/icons/scalable/status/24game.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions Gtkmm3_Mac/res/icons/scalable/status/24game_running.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 49 additions & 4 deletions Gtkmm3_Mac/res/mydock.ui
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@
<property name="pixel-size">48</property>
<property name="icon-name">my_trash</property>
</object>
<object class="GtkImage" id="image22">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">48</property>
<property name="icon-name">24game</property>
<property name="icon_size">6</property>
</object>
<object class="GtkImage" id="image23">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">48</property>
<property name="icon-name">24game</property>
<property name="icon_size">6</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
Expand Down Expand Up @@ -294,6 +308,21 @@
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btngame24">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image23</property>
<property name="relief">none</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
Expand All @@ -302,7 +331,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
<property name="position">10</property>
</packing>
</child>
<child>
Expand All @@ -317,7 +346,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
<property name="position">11</property>
</packing>
</child>
<child>
Expand All @@ -332,9 +361,12 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">11</property>
<property name="position">12</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -613,7 +645,20 @@
</packing>
</child>
<child>
<placeholder/>
<object class="GtkButton" id="padgame24">
<property name="label" translatable="yes">24Game</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image22</property>
<property name="relief">none</property>
<property name="image-position">top</property>
<property name="always-show-image">True</property>
</object>
<packing>
<property name="left-attach">6</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<placeholder/>
Expand Down
34 changes: 34 additions & 0 deletions Gtkmm3_Mac/src/apps/Game24Win.hh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include <gtkmm.h>
#include "Game24.hh"

class Game24Win : public Gtk::Window
{
public:
static Game24Win *create();
Game24Win(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &ref_Glade);

private:
// Main GtkBuilder
Glib::RefPtr<Gtk::Builder> ref_builder;

// 24-Game Class
Game24 main_game;
int pos;
bool focused, winned;
Glib::ustring tmp;

// Child widgets
Gtk::Entry *entry_ans;
Gtk::Label *label_numbers;
Gtk::Button *btns[16], *btnstart, *btnnext, *btncheck, *btnclear, *btnexit;

// Signal Handlers
void btns_clicked(Gtk::Button *button);
void btnstart_clicked();
void btnnext_clicked();
void btncheck_clicked();
void btnclear_clicked();
void entry_ans_focus();
};
Loading

0 comments on commit ced2d49

Please sign in to comment.