Breakout: Set the window icon

This commit is contained in:
Andreas Kling 2020-11-10 14:25:45 +01:00
parent 8c88bf31ed
commit 51e7c6e348
Notes: sideshowbarker 2024-07-19 01:28:11 +09:00

View file

@ -26,13 +26,17 @@
#include "Game.h"
#include <LibGUI/Application.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
auto window = GUI::Window::construct();
window->resize(Breakout::Game::game_width, Breakout::Game::game_height);
auto app_icon = GUI::Icon::default_icon("app-breakout");
window->set_icon(app_icon.bitmap_for_size(16));
window->set_title("Breakout");
window->set_double_buffering_enabled(false);
window->set_main_widget<Breakout::Game>();