1
0
Fork 0

screenPrint() is obsolete. Use screen.log.write() for the same purpose,

or write to the color properties in /sim/screen/. If this Nasal/GUI
implementation turns out to be too slow, we'll write a generic OpenGL/plib
version simliar to the ATCdisplay code.  (OK'ed by Andy and Stuart)
This commit is contained in:
mfranz 2006-02-13 20:08:04 +00:00
parent a9228ee582
commit 034e39dba5
2 changed files with 2 additions and 22 deletions

View file

@ -16,7 +16,6 @@
#include <Main/fg_props.hxx> #include <Main/fg_props.hxx>
#include "NasalSys.hxx" #include "NasalSys.hxx"
#include "NasalDisplay.hxx"
// Read and return file contents in a single buffer. Note use of // Read and return file contents in a single buffer. Note use of
// stat() to get the file size. This is a win32 function, believe it // stat() to get the file size. This is a win32 function, believe it
@ -294,17 +293,6 @@ static naRef f_srand(naContext c, naRef me, int argc, naRef* args)
return naNum(0); return naNum(0);
} }
// Wrapper function for screenPrint
static naRef f_screenPrint(naContext c, naRef me, int argc, naRef* args)
{
if(argc != 1 || !naIsString(args[0]))
naRuntimeError(c, "bad arguments to screenPrint()");
naRef lmsg = args[0];
FGNasalSys* nasal = (FGNasalSys*)globals->get_subsystem("nasal");
nasal->screenPrint(naStr_data(lmsg));
return naNil();
}
// Return an array listing of all files in a directory // Return an array listing of all files in a directory
static naRef f_directory(naContext c, naRef me, int argc, naRef* args) static naRef f_directory(naContext c, naRef me, int argc, naRef* args)
{ {
@ -334,7 +322,6 @@ static struct { char* name; naCFunction func; } funcs[] = {
{ "_interpolate", f_interpolate }, { "_interpolate", f_interpolate },
{ "rand", f_rand }, { "rand", f_rand },
{ "srand", f_srand }, { "srand", f_srand },
{ "screenPrint", f_screenPrint },
{ "directory", f_directory }, { "directory", f_directory },
{ 0, 0 } { 0, 0 }
}; };
@ -621,8 +608,3 @@ void FGNasalSys::setListener(int argc, naRef* args)
node->addChangeListener(new FGNasalListener(handler, this, gcSave(handler)), initial); node->addChangeListener(new FGNasalListener(handler, this, gcSave(handler)), initial);
} }
// functions providing access to the NasalDisplay - used to display text directly on the screen
void FGNasalSys::screenPrint(const char* src)
{
globals->get_Nasal_display()->RegisterSingleMessage(src, 0);
}

View file

@ -41,15 +41,13 @@ public:
// Returns a ghost wrapper for the current _cmdArg // Returns a ghost wrapper for the current _cmdArg
naRef cmdArgGhost(); naRef cmdArgGhost();
// Callbacks for command and timer bindings // Callbacks for command and timer bindings
virtual bool handleCommand(const SGPropertyNode* arg); virtual bool handleCommand(const SGPropertyNode* arg);
void createModule(const char* moduleName, const char* fileName, void createModule(const char* moduleName, const char* fileName,
const char* src, int len); const char* src, int len);
void screenPrint(const char* src);
private: private:
friend class FGNasalScript; friend class FGNasalScript;
friend class FGNasalListener; friend class FGNasalListener;