GOptionPane (Incomplete)
I normally wouldn't release unfinished projects but I know that I won't have time to finish it, so hopefully other scripters looking for something to do will feel like picking up this project and finishing it, since I think it could be valuable for playerworlds to use once finished. With that said, this script, though incomplete, still has some pretty nice points to learn from (such as my sortArrayByArray function and the different conditional statements that I manipulated).
My main goal with this project was to convert as much of the JOptionPane class to GScript as possible, simply because it's fairly easy to create GUIs with Java. A lot of times, with simple message boxes, having to put a bunch of GUI code into a script is not only time-consuming but can make the code look like a mess. What the GOptionPane is intended to do is to allow scripters to create GUIs through flexible commands (I know that there is a GUI editor, but even with the GUI editor, you still have to copy and paste the clutter of code generated by it). Special Functions . showMessageDialog(framePos, frameSize, options, message, title) - public function called to create a message dialog box. framePos is the screen position that the GUI will be drawn in; frameSize is the size of the GUI that will be drawn; options are the GUI variable options; message is the message that will be displayed in the GUI box; title is the title of the GUI. Currently, there is no text control so the message parameter is practically useless. The only thing that this specific function is missing is a text control but that should be fairly easy to add. Also, framePos {width, height} and frameSize {x, y} should each be sent as an array, for example: PHP Code:
About the options Parameter The variable options are as follows: "canclose", "canmaximize", "canminimize", "closequery", "destroyonhide", "maximized", "minimized", "tile" If you send null parameters as the options, the system will automatically create a GUI using defaults that I established in the code (I commented where this is set in the code itself). If you wish to send options, you must do so as an array. You can use boolean values or exact string values, or a mixture of both as such: PHP Code:
Code PHP Code:
|
Tried editing my last post but my browser kept freezing on me; just wanted to add that this will be my last release. I would actually be surprised to see the PC version of this game lasting another 5-10 years (assuming that we don't all die in 2012 :)) since the focus of this game has clearly shifted to a different platform.
This project that I started will more than likely never be touched by anyone again, and that's perfectly fine since there isn't enough development happening at this point that would make this totally convenient (and the GDT probably have better things to do), but hopefully the sorting function proves useful to someone (though that '1' integer problem still needs a workaround). |
Sad to see another developer leave.
Thanks for the release. |
Quote:
|
All times are GMT +2. The time now is 04:33 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.