So I've decided that there will be 4 major foci of Doors CS 6:
:: Making it an app (duh)
:: Maximal compatibility
:: gCn and CALCnet2 - interconnectivity
:: Easy-to-use GUI tools
I'll focus on the fourth of these, easy to use GUI tools, for now. OK, I've decided that in order to make ASM programming as painless as possible for programmers, I'm gonna make DCS6 contain bcalls for common GUI functions. Something like this:
openGUIstack()
pushGUIstack()
popGUIstack()
closeGUIstack()
refreshGUI()
So what exactly is a "GUI Stack" and how am I going to use it? Let's imagine a theoretical program that has a large (ie fullscreen) window in the background, with a dialog that's in the foreground asking the user to confirm something. Firstly, you need to know that the Gstack will be a LIFO type stack - Last In, First Out. If you push 2,3,4, the first thing that will pop off is a 4, and the second thing is a 3. Once you pop something, it is removed from the stack. The Gstack will be a variable-size entity stored in an appvar that is created and initialized when openGUIstack() is called and cleared and deleted when closeGUIstack() is called. refreshGUI() will parse the Gstack and completely update the screen based on the contents of the stack. In other words, it will erase the screen, render the bottommost item in the stack, then the next up, until it reaches the top, to provide the layered-windows effect that the GUI will allow programmers to achieve. Now, the GUI stack is simply a series of entries in this format:
size (1 byte)
type (1 byte)
data (size-1 bytes)
To add an entry to the stack, you write it to some temporary mem, point to that with hl, and then call pushGUIstack(). Things you might want to push onto the stack: window title, sprite, text, input elements, buttons, etc. Once everything you want is on the stack, just call refreshGUI() to draw it all up. Even better, you can then call Mouse() and Doors CS will automatically parse the top Gstack entry, figure out the requisite hotspots, and handle all mouse-related stuff including various cursors, like arrow or text-edit, entry of text into GUI elements and modifications to the GUI stack, and then returning the values on the stack back to the program for processing. If you want to remove the top GUI element, such as the dialog box, simply call popGUIstack(). If you pop off the last element or call closeGUIstack(), the stack will be disabled and deleted. The GUI stack format is as follows;
-Header:defines window type and number of entries in group
---Element
---Element
---Element
-Header
---Element
---Element
---Element
---Element
I will post more detailed information as I come up with it. Feel free to provide feedback.
:: Making it an app (duh)
:: Maximal compatibility
:: gCn and CALCnet2 - interconnectivity
:: Easy-to-use GUI tools
I'll focus on the fourth of these, easy to use GUI tools, for now. OK, I've decided that in order to make ASM programming as painless as possible for programmers, I'm gonna make DCS6 contain bcalls for common GUI functions. Something like this:
openGUIstack()
pushGUIstack()
popGUIstack()
closeGUIstack()
refreshGUI()
So what exactly is a "GUI Stack" and how am I going to use it? Let's imagine a theoretical program that has a large (ie fullscreen) window in the background, with a dialog that's in the foreground asking the user to confirm something. Firstly, you need to know that the Gstack will be a LIFO type stack - Last In, First Out. If you push 2,3,4, the first thing that will pop off is a 4, and the second thing is a 3. Once you pop something, it is removed from the stack. The Gstack will be a variable-size entity stored in an appvar that is created and initialized when openGUIstack() is called and cleared and deleted when closeGUIstack() is called. refreshGUI() will parse the Gstack and completely update the screen based on the contents of the stack. In other words, it will erase the screen, render the bottommost item in the stack, then the next up, until it reaches the top, to provide the layered-windows effect that the GUI will allow programmers to achieve. Now, the GUI stack is simply a series of entries in this format:
size (1 byte)
type (1 byte)
data (size-1 bytes)
To add an entry to the stack, you write it to some temporary mem, point to that with hl, and then call pushGUIstack(). Things you might want to push onto the stack: window title, sprite, text, input elements, buttons, etc. Once everything you want is on the stack, just call refreshGUI() to draw it all up. Even better, you can then call Mouse() and Doors CS will automatically parse the top Gstack entry, figure out the requisite hotspots, and handle all mouse-related stuff including various cursors, like arrow or text-edit, entry of text into GUI elements and modifications to the GUI stack, and then returning the values on the stack back to the program for processing. If you want to remove the top GUI element, such as the dialog box, simply call popGUIstack(). If you pop off the last element or call closeGUIstack(), the stack will be disabled and deleted. The GUI stack format is as follows;
-Header:defines window type and number of entries in group
---Element
---Element
---Element
-Header
---Element
---Element
---Element
---Element
I will post more detailed information as I come up with it. Feel free to provide feedback.