mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
GamesSettings: Add chess settings :^)
This adds a tab for configuring the appearance of Chess, along with a preview.
This commit is contained in:
parent
64c9c7a4da
commit
05913b853a
5 changed files with 416 additions and 6 deletions
39
Userland/Applications/GamesSettings/ChessSettingsWidget.h
Normal file
39
Userland/Applications/GamesSettings/ChessSettingsWidget.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibGUI/SettingsWindow.h>
|
||||
#include <LibGfx/Color.h>
|
||||
|
||||
namespace GamesSettings {
|
||||
|
||||
class ChessGamePreview;
|
||||
|
||||
class ChessSettingsWidget final : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT_ABSTRACT(ChessSettingsWidget)
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<ChessSettingsWidget>> try_create();
|
||||
virtual ~ChessSettingsWidget() override = default;
|
||||
|
||||
virtual void apply_settings() override;
|
||||
virtual void reset_default_values() override;
|
||||
|
||||
private:
|
||||
ChessSettingsWidget() = default;
|
||||
ErrorOr<void> initialize();
|
||||
|
||||
Vector<DeprecatedString> m_piece_sets;
|
||||
|
||||
RefPtr<ChessGamePreview> m_preview;
|
||||
RefPtr<GUI::ComboBox> m_piece_set_combobox;
|
||||
RefPtr<GUI::ComboBox> m_board_theme_combobox;
|
||||
RefPtr<GUI::CheckBox> m_show_coordinates_checkbox;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue