mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
Snake: Set Snake as default skin
Set 'Snake' as the default skin for its aesthetic appeal and color harmony with the game's icon.
This commit is contained in:
parent
7740aeca29
commit
15d6b3017a
2 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ ErrorOr<NonnullRefPtr<Game>> Game::try_create()
|
|||
}
|
||||
|
||||
auto color = Color::from_argb(Config::read_u32("Snake"sv, "Snake"sv, "BaseColor"sv, Color(Color::Green).value()));
|
||||
auto skin_name = TRY(String::from_byte_string(Config::read_string("Snake"sv, "Snake"sv, "SnakeSkin"sv, "Classic"sv)));
|
||||
auto skin_name = TRY(String::from_byte_string(Config::read_string("Snake"sv, "Snake"sv, "SnakeSkin"sv, "Snake"sv)));
|
||||
auto skin = TRY(SnakeSkin::create(skin_name, color));
|
||||
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) Game(move(food_bitmaps), color, skin_name, move(skin)));
|
||||
|
|
|
@ -59,7 +59,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
game.set_focus(true);
|
||||
|
||||
auto high_score = Config::read_u32("Snake"sv, "Snake"sv, "HighScore"sv, 0);
|
||||
auto snake_skin_name = Config::read_string("Snake"sv, "Snake"sv, "SnakeSkin"sv, "Classic"sv);
|
||||
auto snake_skin_name = Config::read_string("Snake"sv, "Snake"sv, "SnakeSkin"sv, "Snake"sv);
|
||||
|
||||
auto& statusbar = *widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar"sv);
|
||||
statusbar.set_text(0, "Score: 0"_string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue