25 #include "glm/mat4x4.hpp" 26 #include "glm/gtc/type_ptr.hpp" 27 #include "glm/gtc/matrix_transform.hpp" 47 GUI(console), _module(module), _pc(pc), _step(0), _charSubScene(new
Graphics::
Aurora::SubSceneQuad) {
53 static const char *
const kEmptyLabels[] = {
54 "VIT_ARROW_LBL",
"DEF_ARROW_LBL",
"LBL_NAME",
55 "WILL_ARROW_LBL",
"REFL_ARROW_LBL",
"FORT_ARROW_LBL",
56 "VIT_ARROW_LBL",
"DEF_ARROW_LBL",
"LBL_NAME" 59 for (
size_t i = 0; i <
ARRAYSIZE(kEmptyLabels); i++) {
65 static const char *
const kInvisibleWidgets[] = {
66 "NEW_LBL",
"OLD_LBL",
"LBL_LEVEL",
"LBL_LEVEL_VAL" 69 for (
size_t i = 0; i <
ARRAYSIZE(kInvisibleWidgets); i++) {
99 float subSceneWidth = lblModel ? lblModel->
getWidth() : 1.0f;
100 float subSceneHeight = lblModel ? lblModel->
getHeight() : 1.0f;
102 glm::mat4 projection(glm::perspective(
Common::deg2rad(22.72f), subSceneWidth/subSceneHeight, 0.1f, 10.0f));
108 float modelView[] = {
109 0.000900542, 0.0176735, 0.999843, 0,
110 0.999999, 0.000900542, -0.00091657, 0,
111 -0.00091657, 0.999843, -0.0176727, 0,
115 glm::mat4 transformation(glm::make_mat4(modelView));
117 transformation = glm::translate(transformation, glm::vec3(-4.87251f, 0.0f, -0.776371f));
119 transformation = glm::rotate(transformation,
121 glm::vec3(0.0f, 0.0f, 1.0f));
130 _charSubScene->setGlobalTransformationMatrix(transformation);
void load(const Common::UString &resref)
Widget * getWidget(const Common::UString &tag, bool vital=false)
Return a widget in the GUI.
static const Common::UString & kBackgroundTypeMenu
The menu for modifying the portrait of the.
A label widget for Star Wars: Knights of the Old Republic and Jade Empire.
#define TalkMan
Shortcut for accessing the talk manager.
uint32 _returnCode
The GUI's return code.
The panel to customize a quick character.
The panel to choose between quick or custom characters.
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
void load(const Common::UString &module, const Common::UString &entryLocation="", ObjectType entryLocationType=kObjectTypeAll)
Load a module.
virtual void hide()
Hide the GUI.
Graphics::Aurora::Model * getModel()
void exceptionDispatcherWarning(const char *s,...)
Exception dispatcher that prints the exception as a warning, and adds another reason on top...
void removeChild(GUI *gui)
Remove a child GUI object from this GUI.
Utility templates and functions.
void info(const char *s,...)
uint32 sub(GUI &gui, uint32 startCode=kStartCodeNone, bool showSelf=true, bool hideSelf=true)
Open up a sub GUI.
Creature * getCharacter() const
The panel to customize a custom character.
void addBackground(const Common::UString &background, bool front=false)
virtual void show()
Show the GUI.
WidgetLabel * getLabel(const Common::UString &tag, bool vital=false)
PointerType get() const
Returns the plain pointer value.
The global talk manager for Aurora strings.
EventType
Custom event types.
The menu for modifying the name of the character.
The primary character generation menu.
Class getClass() const
Get the class of the character, defined in types.h.
void usePC(Creature *pc)
Use this character as the player character.
Keyboard key was released.
static float deg2rad(float deg)
#define GfxMan
Shortcut for accessing the graphics manager.
Common::UString getPortrait() const
Get the name of the portrait of this character.
void addChild(GUI *gui)
Add a child GUI object to this GUI.