mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:07:46 +00:00
Hearts: Allow player to set their name
Added a new settings dialog to Hearts with a textbox to allow the player to set a name, which is persisted in the Hearts config file.
This commit is contained in:
parent
e706de8f91
commit
d27616cf36
6 changed files with 104 additions and 4 deletions
21
Userland/Games/Hearts/SettingsDialog.h
Normal file
21
Userland/Games/Hearts/SettingsDialog.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <LibGUI/Dialog.h>
|
||||
|
||||
class SettingsDialog : public GUI::Dialog {
|
||||
C_OBJECT(SettingsDialog)
|
||||
public:
|
||||
String const& player_name() const { return m_player_name; }
|
||||
|
||||
private:
|
||||
SettingsDialog(GUI::Window* parent, String player_name);
|
||||
|
||||
String m_player_name { "Gunnar" };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue