46
Script Releases / Re: Dialog System v1.0
« on: September 18, 2014, 12:01:26 pm »
While the system looks nice, the script could've been a lot better. If you'd use arrays as parameters instead of using vargv you would be able to take out a lot of switches and a lot of duplicate code.
And I think what S.L.C. means is you can add your own custom function to an item. Something like this should give you an idea on how to do this:
When you create an item in the dialog, you specify a function as a string:
Then in your addsubdialog you save that function string like so:
When the player selects that you call that function like so:
Offtopic:
And I think what S.L.C. means is you can add your own custom function to an item. Something like this should give you an idea on how to do this:
When you create an item in the dialog, you specify a function as a string:
Code: [Select]
AddSubDialog(1,"Test 1","onDialogTest");
Then in your addsubdialog you save that function string like so:
Code: [Select]
if( getroottable().rawin( callbackFunction ) )
{
local pPointer = getroottable().rawget( callbackFunction );
if( pPointer )
{
subCallback[option] = pPointer;
}
}
When the player selects that you call that function like so:
Code: [Select]
subCallback[option](player, otherParameters);
Offtopic:
The LU GUI system was written from scratch by the Liberty Unleashed team. Since they joined forces, I would think VCMP would just use that.LU uses a GUI system, I don't know what library is that but seems be pretty good on performance, should you use it, or do you have another thing in mind?I think VCMP should give us a proper dialog system based on CEGUI library that I think it uses
We plan on adding a GUI system in the future. We don't plan on using CEGUI for performance reasons.
And sorry for the off topic, but I'm really curious about that.