Skip to content

Commit

Permalink
Chess: Capitalize chess set names + Rename 'stelar7' to 'Classic'
Browse files Browse the repository at this point in the history
Now when selecting a chess set in Games Settings, the names of the sets
are capitalized which looks much neater.

The default set 'stelar7' has been renamed to 'Classic' to reflect its
default vanilla design, as opposed to more stylized sets.
This commit also updates any code references to this set.
  • Loading branch information
cubiclove authored and ADKaster committed Aug 29, 2023
1 parent f3e5335 commit 91269a8
Show file tree
Hide file tree
Showing 51 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Userland/Applications/GamesSettings/ChessSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ ErrorOr<void> ChessSettingsWidget::initialize()
{
TRY(load_from_gml(chess_settings_widget_gml));

auto piece_set_name = Config::read_string("Games"sv, "Chess"sv, "PieceSet"sv, "stelar7"sv);
auto piece_set_name = Config::read_string("Games"sv, "Chess"sv, "PieceSet"sv, "Classic"sv);
auto board_theme = get_board_theme(Config::read_string("Games"sv, "Chess"sv, "BoardTheme"sv, "Beige"sv));
auto show_coordinates = Config::read_bool("Games"sv, "Chess"sv, "ShowCoordinates"sv, true);

Expand Down Expand Up @@ -302,8 +302,8 @@ void ChessSettingsWidget::reset_default_values()
{
// FIXME: `set_text()` on a combobox doesn't trigger the `on_change` callback, but it probably should!
// Until then, we have to manually tell the preview to update.
m_piece_set_combobox->set_text("stelar7");
(void)m_preview->set_piece_set_name("stelar7");
m_piece_set_combobox->set_text("Classic");
(void)m_preview->set_piece_set_name("Classic");
auto& board_theme = get_board_theme("Beige"sv);
m_board_theme_combobox->set_text(board_theme.name);
m_preview->set_dark_square_color(board_theme.dark_square_color);
Expand Down
2 changes: 1 addition & 1 deletion Userland/Games/Chess/ChessWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
ErrorOr<NonnullRefPtr<ChessWidget>> ChessWidget::try_create()
{
auto widget = TRY(AK::adopt_nonnull_ref_or_enomem(new (nothrow) ChessWidget));
widget->set_piece_set("stelar7"sv);
widget->set_piece_set("Classic"sv);

return widget;
}
Expand Down
2 changes: 1 addition & 1 deletion Userland/Games/Chess/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)

window->set_icon(app_icon.bitmap_for_size(16));

widget->set_piece_set(Config::read_string("Games"sv, "Chess"sv, "PieceSet"sv, "stelar7"sv));
widget->set_piece_set(Config::read_string("Games"sv, "Chess"sv, "PieceSet"sv, "Classic"sv));
widget->set_board_theme(Config::read_string("Games"sv, "Chess"sv, "BoardTheme"sv, "Beige"sv));
widget->set_coordinates(Config::read_bool("Games"sv, "Chess"sv, "ShowCoordinates"sv, true));
widget->set_show_available_moves(Config::read_bool("Games"sv, "Chess"sv, "ShowAvailableMoves"sv, true));
Expand Down

0 comments on commit 91269a8

Please sign in to comment.