mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:27:39 +00:00
Hearts: Port to GML compiler
This commit is contained in:
parent
27339fe6e7
commit
343d6b001f
5 changed files with 30 additions and 13 deletions
|
@ -8,9 +8,9 @@
|
|||
*/
|
||||
|
||||
#include "Game.h"
|
||||
#include "MainWidget.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include <AK/URL.h>
|
||||
#include <Games/Hearts/HeartsGML.h>
|
||||
#include <LibConfig/Client.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibCore/Timer.h>
|
||||
|
@ -25,7 +25,6 @@
|
|||
#include <LibGUI/Statusbar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <stdio.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
|
@ -50,8 +49,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_title("Hearts");
|
||||
|
||||
auto widget = window->set_main_widget<GUI::Widget>();
|
||||
TRY(widget->load_from_gml(hearts_gml));
|
||||
auto widget = TRY(Hearts::MainWidget::try_create());
|
||||
window->set_main_widget(widget);
|
||||
|
||||
auto& game = *widget->find_descendant_of_type_named<Hearts::Game>("game");
|
||||
game.set_focus(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue