1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +00:00

Chess: Make the main widget a GUI::Frame for a nicer look :^)

This commit is contained in:
Andreas Kling 2021-05-17 12:02:38 +02:00
parent 2083d1a3d6
commit 67ed580532
3 changed files with 23 additions and 21 deletions

View file

@ -10,16 +10,14 @@
#include <AK/HashMap.h>
#include <AK/NonnullRefPtr.h>
#include <AK/Optional.h>
#include <AK/StringView.h>
#include <LibChess/Chess.h>
#include <LibGUI/Widget.h>
#include <LibGUI/Frame.h>
#include <LibGfx/Bitmap.h>
class ChessWidget final : public GUI::Widget {
C_OBJECT(ChessWidget)
class ChessWidget final : public GUI::Frame {
C_OBJECT(ChessWidget);
public:
ChessWidget();
ChessWidget(const StringView& set);
virtual ~ChessWidget() override;
virtual void paint_event(GUI::PaintEvent&) override;
@ -107,6 +105,8 @@ public:
};
private:
ChessWidget();
Chess::Board m_board;
Chess::Board m_board_playback;
bool m_playback { false };