For that a couple of things need to be implemented like:
- Being able to show a "dialog"
- Being able to put some stuff on the dialog with input boxes, buttons and more
- Being able to process those inputs and react to the buttons
- Being able to save data for the game like "object on sale", query, update and delete those entries
Up to the last point all is pretty clear and easy to implement even if you will not use HTML to fill the form but more an enhanced BB code to avoid XSS and nasty JS injections.
The last point however requires async calls, as the call will basically call back the backend and receive the data from it. Ideally the script should be blocked till the result come back and therefore makes the script coding much easier like:
Code: Select all
var toShow="";
var query=Storage.Select('itemsOnSale');
while(Storage.NextRow(query))
{
toShow+=Storage.GetValue('Name')+"\n";
}
Display.Dialog(toShow);
What do you think? Would you prefer a linear call like in this example or a system with callbacks?