broken commit - I'm working on it

git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@106 ea6a568a-9f4f-0410-981a-c910a81bb256
actorid
nkorslund 16 years ago
parent b7bdb1f815
commit 6b2d64d38f

@ -44,7 +44,7 @@ public:
Console()
: Layout("openmw_console_layout.xml")
{
setCoord(0,0,
setCoord(10,10,
mWindow->getWidth()*2/3, mWindow->getHeight()/2);
getWidget(command, "edit_Command");
@ -72,7 +72,7 @@ public:
const Ogre::UTFString &cm = command->getCaption();
if(cm.empty()) return;
history->addText("#FFFFFF" + cm + "\n");
history->addText("#FFFFFF> " + cm + "\n");
int res = console_input(cm.asUTF8_c_str());
Ogre::UTFString out = console_output();

@ -264,13 +264,18 @@ void setupGUIScripts()
cons = new Console(cmo);
// Bind native functions
cmc.bind("walk", { bullet_walk(); });
cmc.bind("fly", { bullet_fly(); });
cmc.bind("ghost", { bullet_ghost(); });
cmc.bind("setfont", { gui_setConsoleFont(toStringz(stack.popString8())); });
cmc.bind("walk", { bullet_walk(); cons.putln("Walk mode enabled");});
cmc.bind("fly", { bullet_fly(); cons.putln("Fly mode enabled");});
cmc.bind("ghost", { bullet_ghost(); cons.putln("Ghost mode enabled");});
cmc.bind("setfont",
{
char[] fnt = stack.popString8();
gui_setConsoleFont(toStringz(fnt));
cons.putln("Setting font " ~ fnt);
});
cmc.bind("clear", { gui_clearConsole(); });
cmc.bind("exit", { exitProgram(); });
cmc.bind("wireframe", { writefln("Wireframe not fixed yet"); });
cmc.bind("wireframe", { cons.putln("Wireframe mode not implemented yet"); });
}
Console cons;

@ -5,7 +5,7 @@
<Property key="Window_MinMax" value="200 100 2000 2000"/>
<!-- Log window -->
<Widget type="Edit" skin="MW_ConsoleLog" position="0 0 400 365" align="Stretch" name="list_History"/>
<Widget type="Edit" skin="MW_ConsoleLog" position="5 5 390 360" align="Stretch" name="list_History"/>
<!-- Command line -->
<Widget type="Edit" skin="MW_ConsoleCommand" position="0 365 392 28" align="HStretch Bottom" name="edit_Command"/>

@ -115,7 +115,6 @@ class Console
trd = Thread.getPaused();
}
private:
void put(char[] str, bool newLine=false)
{
if(hasCallback)
@ -134,6 +133,8 @@ class Console
void putln(char[] str) { put(str, true); }
private:
Statement[] parse(TokenArray toks, Scope sc)
{
Statement b;

@ -67,3 +67,13 @@ int fltv;
int unam;
// TODO: Scripts
// Cute hack for the console
char[] pos()
{
// TODO: Make this simpler
char[] xx = x;
char[] yy = y;
char[] zz = z;
return "X:" ~ xx ~ " Y:" ~ yy ~ " Z:" ~ zz;
}

@ -45,7 +45,7 @@ struct PlayerData
void setup()
{
assert(mo is null);
mo = vm.load("game.player").createObject;
mo = vm.load("game.player").getSing;
level = mo.getIntPtr("level");
// Still an ugly hack

@ -25,6 +25,7 @@ module scene.soundlist;
import esm.loadsoun;
import sound.audio;
import sound.sfx;
SoundList soundScene;

Loading…
Cancel
Save