-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDisplayLuaCallback.cpp
More file actions
38 lines (33 loc) · 1.03 KB
/
DisplayLuaCallback.cpp
File metadata and controls
38 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "DisplayLuaCallback.h"
#include "Display.h"
template <>
DisplayLuaCallback *Ogre::Singleton<DisplayLuaCallback>::ms_Singleton = 0;
DisplayLuaCallback::DisplayLuaCallback() {
fChar = "";
wrtLn = "";
dtex = "";
dfont = "";
lines = -1;
newLine = false;
fontSize = "";
doClear = false;
}
DisplayLuaCallback::~DisplayLuaCallback() {}
void DisplayLuaCallback::setDimensions(Real x1, Real y1, Real x2, Real y2) {
Display::getSingleton().textbox->setTop(x1);
Display::getSingleton().textbox->setLeft(y1);
Display::getSingleton().textbox->setHeight(y2);
Display::getSingleton().textbox->setWidth(x2);
// Display::getSingleton().textbox->setDimensions(x2,y2);
}
void DisplayLuaCallback::shutdown() {
if (Display::getSingleton().isVisible()) {
// Display::getSingleton().hide();
Display::getSingleton().reset();
}
}
void DisplayLuaCallback::resetDimensions() {
Display::getSingleton().textbox->setTop(0);
Display::getSingleton().textbox->setLeft(0);
Display::getSingleton().textbox->setDimensions(1, 1);
}