From 6817120ef7804b8214a4bf00f5df2e40af890b35 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Fri, 16 May 2014 11:56:01 +1000 Subject: Add a stub LSLGuiMess Lua script. --- lib/LSLGuiMess.lua | 31 +++++++++++++++++++++++++++++++ src/extantz/extantz.c | 7 ++++++- src/extantz/extantz.h | 1 + src/love/love.c | 1 - 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 lib/LSLGuiMess.lua diff --git a/lib/LSLGuiMess.lua b/lib/LSLGuiMess.lua new file mode 100644 index 0000000..bc781ce --- /dev/null +++ b/lib/LSLGuiMess.lua @@ -0,0 +1,31 @@ +--[[ LSLGuiMess - replicates the horrid and barely usable LSL user interface crap. +]] + +do + + local skang = require 'skang' + -- This module has no default skin, it creates windows as needed. + local _M = skang.moduleBegin('LSLGuiMess', nil, 'Copyright 2014 David Seikel', '0.1', '2014-05-16 11:07:00') + +--[[ TODO - + +llDialog(key id, string message, list buttons, integer chat_channel) + http://lslwiki.net/lslwiki/wakka.php?wakka=llDialog + +llTextBox() + http://wiki.secondlife.com/wiki/LlTextBox + +llSetText(string text, vector color, float alpha) + http://lslwiki.net/lslwiki/wakka.php?wakka=llSetText + +llSetSitText(string text) + http://lslwiki.net/lslwiki/wakka.php?wakka=llSetSitText + +llSetTouchText(string text) + http://lslwiki.net/lslwiki/wakka.php?wakka=llSetTouchText + +]] + + skang.moduleEnd(_M) +end + diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 87ea40e..6c68bd2 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c @@ -61,6 +61,10 @@ static Eina_Bool _data(void *data, int type, Ecore_Con_Event_Server_Data *ev) lua_getfield(ourGlobals->purkle->L, LUA_REGISTRYINDEX, ourGlobals->purkle->name); _M = lua_gettop(ourGlobals->purkle->L); push_lua(ourGlobals->purkle->L, "@ ( $ )", _M, "append", buf, 0); + + lua_getfield(ourGlobals->LSLGuiMess->L, LUA_REGISTRYINDEX, ourGlobals->LSLGuiMess->name); + _M = lua_gettop(ourGlobals->LSLGuiMess->L); + PI("Dialog from %s - %s", SID, command); // TODO - Somewhere in the chain the new lines that MLP likes to put into llDialog's message munge things. Fix that. } @@ -651,7 +655,8 @@ EAPI_MAIN int elm_main(int argc, char **argv) // overlay_add(&ourGlobals); GuiLuaLoad("test", ourGlobals.mainWindow, ourGlobals.world); woMan_add(&ourGlobals); - ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world); + ourGlobals.LSLGuiMess = GuiLuaLoad("LSLGuiMess", ourGlobals.mainWindow, ourGlobals.world); + ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world); ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); // Bump the top toolbar above the windows. diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h index bfab4cb..9a8f2bf 100644 --- a/src/extantz/extantz.h +++ b/src/extantz/extantz.h @@ -230,6 +230,7 @@ typedef struct _globals winFang *files; GuiLua *purkle; + GuiLua *LSLGuiMess; Ecore_Con_Server *server; const char *address; diff --git a/src/love/love.c b/src/love/love.c index aede741..113118c 100644 --- a/src/love/love.c +++ b/src/love/love.c @@ -368,7 +368,6 @@ static Eina_Bool _dataLuaSL(void *data, int type, Ecore_Con_Event_Server_Data *e { if (ourGlobals->client) sendBack(ourGlobals->client, SID, command); else PW("No where to send %s", command); - PD("DIALOG %s", command); } else if (0 == strncmp(command, "llMessageLinked(", 16)) { -- cgit v1.1