mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Solitaire: Place files in Solitaire namespace and rename main widget
The purpose is to allow the Solitaire widget to be used in GML. The macro to register a widget requires a namespace, so this moves all files in the application to the Solitaire namespace. This also renames the SolitaireWidget class to Game - this is to avoid the redundancy / verbosity of typing "Solitaire::SolitaireWidget", and matches many other games in Serenity (Breakout, 2048, etc.).
This commit is contained in:
parent
15f0ee1727
commit
e1492e9a62
8 changed files with 59 additions and 35 deletions
|
@ -9,6 +9,8 @@
|
|||
#include <LibGfx/Font.h>
|
||||
#include <LibGfx/FontDatabase.h>
|
||||
|
||||
namespace Solitaire {
|
||||
|
||||
static const NonnullRefPtr<Gfx::CharacterBitmap> s_diamond = Gfx::CharacterBitmap::create_from_ascii(
|
||||
" # "
|
||||
" ### "
|
||||
|
@ -155,3 +157,5 @@ void Card::clear_and_draw(GUI::Painter& painter, const Color& background_color)
|
|||
draw(painter);
|
||||
save_old_position();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue