-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KOTOR: Add a stub menu to change the name
- Loading branch information
1 parent
8d53801
commit fcb920b
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* xoreos - A reimplementation of BioWare's Aurora engine | ||
* | ||
* xoreos is the legal property of its developers, whose names | ||
* can be found in the AUTHORS file distributed with this source | ||
* distribution. | ||
* | ||
* xoreos is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* xoreos is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with xoreos. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** @file | ||
* The menu for modifying the name of the character. | ||
*/ | ||
|
||
#include "src/engines/kotor/gui/widgets/kotorwidget.h" | ||
#include "src/engines/kotor/gui/widgets/label.h" | ||
|
||
#include "src/engines/kotor/gui/chargen/chargenname.h" | ||
|
||
namespace Engines { | ||
|
||
namespace KotOR { | ||
|
||
CharacterGenerationNameMenu::CharacterGenerationNameMenu(CharacterGenerationInfo &info, Console *console) : | ||
CharacterGenerationBaseMenu(info, console) { | ||
|
||
load("name"); | ||
|
||
addBackground(kBackgroundTypeMenu); | ||
|
||
getLabel("NAME_BOX_EDIT")->setText(""); | ||
} | ||
|
||
void CharacterGenerationNameMenu::callbackActive(Widget &widget) { | ||
if (widget.getTag() == "BTN_BACK") { | ||
_returnCode = 1; | ||
return; | ||
} | ||
|
||
if (widget.getTag() == "END_BTN") { | ||
_returnCode = 1; | ||
accept(); | ||
return; | ||
} | ||
} | ||
|
||
} // End of namespace KotOR | ||
|
||
} // End of namespace Engines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* xoreos - A reimplementation of BioWare's Aurora engine | ||
* | ||
* xoreos is the legal property of its developers, whose names | ||
* can be found in the AUTHORS file distributed with this source | ||
* distribution. | ||
* | ||
* xoreos is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 3 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* xoreos is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with xoreos. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** @file | ||
* The menu for modifying the name of the character. | ||
*/ | ||
|
||
#ifndef ENGINES_KOTOR_GUI_CHARGEN_CHARGENNAME_H | ||
#define ENGINES_KOTOR_GUI_CHARGEN_CHARGENNAME_H | ||
|
||
#include "src/engines/kotor/gui/gui.h" | ||
|
||
#include "src/engines/kotor/gui/chargen/chargenbase.h" | ||
|
||
namespace Engines { | ||
|
||
namespace KotOR { | ||
|
||
class CharacterGenerationNameMenu : public CharacterGenerationBaseMenu { | ||
public: | ||
CharacterGenerationNameMenu(CharacterGenerationInfo &info, ::Engines::Console *console = 0); | ||
|
||
private: | ||
void callbackActive(Widget &widget); | ||
}; | ||
|
||
} // End of namespace KotOR | ||
|
||
} // End of namespace Engines | ||
|
||
#endif // ENGINES_KOTOR_GUI_CHARGEN_CHARGENNAME_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters