Dialog System - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Material Development (https://www.save-point.org/forum-8.html) +--- Forum: Scripts Database (https://www.save-point.org/forum-39.html) +---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html) +---- Thread: Dialog System (/thread-2473.html) |
Dialog System - Zeriab - 03-06-2008 I have tried to make a Dialog system which is intended to ease the creation of dialogs. Dialog System What is a dialog? You can consider it as a scene that runs on top of the current scene. Here is an example of how the system can be used. It is a yes/no dialog. An example - A Yes/No Dialog I have tried to give dialogs the feeling of scenes. When you create a dialog you will in most cases only have to overwrite 3-4 methods: main_window You should create the windows you are going to use in this method. Please set the .z-values of the windows to at least STARTING_Z_VALUE + 1 This is what you put before the main loop when creating a normal scene. You can consider it pretty much equivalent to the main_window method in the SDK. Does nothing by default main_dispose Dispose of the windows you have created here and do any other clean up you find necessary. Does nothing by default update The update method is pretty much equivalent to the update method in a normal scene. Exits the scene when you press the B-button by default. You end the dialog by calling the mark_to_close method. It will then exit just like if you normally change the scene. Remember to set the value that will be returned. By default is nil returned. Use self.value = ... to set the value. This value will not be frozen after you use the mark_to_close method, which means that you can change the value after you use that method if it happens later in the update method. I am certain that I have messed something up or forgotten to tell something important. Please do tell if you run into any problems *hugs* - Zeriab |