HoverRace  2.0
ProfileEditScene.h
Go to the documentation of this file.
1 
2 // ProfileEditScene.h
3 //
4 // Copyright (c) 2016 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "../../engine/Player/EditableProfile.h"
25 
26 #include "DialogScene.h"
27 
28 namespace HoverRace {
29  namespace Display {
30  class Button;
31  class Label;
32  }
33  namespace Player {
34  class Profile;
35  }
36 }
37 
38 namespace HoverRace {
39 namespace Client {
40 
46 {
47  using SUPER = DialogScene;
48 
49 public:
51  const std::string &parentTitle,
52  std::shared_ptr<Player::Profile> origProfile);
53  virtual ~ProfileEditScene() { }
54 
55 private:
56  void OnRename();
57  void OnAvatarSelect();
58 
59 protected:
60  void OnOk() override;
61 
62 private:
63  std::unique_ptr<Player::Profile> profile;
66  std::shared_ptr<Player::Profile> origProfile;
67 
68  std::shared_ptr<Display::Button> avatarBtn;
69  std::shared_ptr<Display::Label> nameLbl;
70  std::shared_ptr<Display::Button> primaryColorBtn;
71  std::shared_ptr<Display::Button> secondaryColorBtn;
72 
73  boost::signals2::scoped_connection avatarClickedConn;
74  boost::signals2::scoped_connection avatarSelConn;
75  boost::signals2::scoped_connection renameConn;
76  boost::signals2::scoped_connection saveConn;
77 };
78 
79 } // namespace Client
80 } // namespace HoverRace
boost::signals2::scoped_connection avatarSelConn
Definition: ProfileEditScene.h:74
std::shared_ptr< Display::Button > primaryColorBtn
Definition: ProfileEditScene.h:70
Interface for game client shells.
Definition: GameDirector.h:57
std::shared_ptr< Display::Button > avatarBtn
Definition: ProfileEditScene.h:68
Profile view and edit scene.
Definition: ProfileEditScene.h:45
boost::signals2::scoped_connection saveConn
Definition: ProfileEditScene.h:76
GameDirector & director
Definition: TestLabScene.cpp:160
Player::RenamableProfile * renameProfile
Definition: ProfileEditScene.h:65
std::shared_ptr< Display::Button > secondaryColorBtn
Definition: ProfileEditScene.h:71
boost::signals2::scoped_connection avatarClickedConn
Definition: ProfileEditScene.h:73
Base class for scenes with a title and status area.
Definition: DialogScene.h:46
virtual ~ProfileEditScene()
Definition: ProfileEditScene.h:53
Base class for display managers.
Definition: Display.h:73
Base class for full-scene menus and the like.
Definition: FormScene.h:48
std::shared_ptr< Player::Profile > origProfile
Definition: ProfileEditScene.h:66
Player::EditableProfile * editProfile
Definition: ProfileEditScene.h:64
boost::signals2::scoped_connection renameConn
Definition: ProfileEditScene.h:75
std::shared_ptr< Display::Label > nameLbl
Definition: ProfileEditScene.h:69
std::unique_ptr< Player::Profile > profile
Definition: ProfileEditScene.h:63
Interface for profiles than can be renamed.
Definition: EditableProfile.h:59
Definition: Announcement.h:24
Interface for profile editing.
Definition: EditableProfile.h:43