mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
Chess: Move ChessWidget
to the create pattern
This commit is contained in:
parent
f66098ab6f
commit
e7377c6d60
2 changed files with 9 additions and 4 deletions
|
@ -19,9 +19,12 @@
|
|||
#include <LibGfx/Path.h>
|
||||
#include <unistd.h>
|
||||
|
||||
ChessWidget::ChessWidget()
|
||||
ErrorOr<NonnullRefPtr<ChessWidget>> ChessWidget::try_create()
|
||||
{
|
||||
set_piece_set("stelar7"sv);
|
||||
auto widget = TRY(AK::adopt_nonnull_ref_or_enomem(new (nothrow) ChessWidget));
|
||||
widget->set_piece_set("stelar7"sv);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
void ChessWidget::paint_event(GUI::PaintEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue