Is there an option or will there be one added to where you can add your own graphical dialog boxes, etc.. Like in Colonel's Bequest? I didn't see anything relating to this in the manual. Just curious.|
Thanks. Excellent work!
To make customized, graphical dialog boxes with borders and such, you just need to write a little bit of script. It's all done by the script, and not the interpreter.|
I played around with it a little while ago, and produced some custom windows/buttons/controls.
Look at: http://www.classicgaming.com/agisci/scigui.htm for some screen shots.
Just modify CONTROLS.SC, and you're set! Override the draw() methods and such.
|Fritos||Thanks.. I'll see what I can come up with..|
Looks cool, but maybe that should be in a tutorial or such.|
They say an image is worth a thousand words, but code is even better.
|Brian_Provinciano||I suppose, but I need to finish the current tutorials first.|
Ofcourse. But at least tell me this:|
In controls.sc I found the Draw method. There was one command in there, DrawControl(self). Obviously, that's the method you told Fritos to override.
In the Button's class, I made a Draw method with that same DrawControl(self), followed by some Graph commands to make white/d.gray lines.'
They don't work. I myself don't really need a complete tutorial on this subject, but the code to those Win95 style buttons would be sufficient. Please??
|AGI1122||I too would love to see the code to do this... I could probably do it myself after playing with the graph function a bit though.|
|Pikachu14||Before trying the white/d.gray lines, I managed to add a red diagonal line on the buttons. Unfortunatly, it wouldn't show up until highlighting...|
|Brian_Provinciano||Graph commands are only used for the picture screens. I scratch the DrawControl call and replace it with DrawCel and Display calls to create a custom control.|
|AGI1122||Alright I took out DrawControl, and added DrawCel and Display... the Display part is working but the DrawCel part isn't. It doesn't have a GUI around it using the view I set... does the view have to be a certain size or something?|
All you need to do is make a view with cels for the button's border and draw it with a loop. If the button is 40 pixels wide and you use a 4 pixel cel, the loop would go from 0 to 9, for example.|
You use the left, right, top, bottom properties to draw it.
It involves a lot of size calculation/size adjustment to get it all right.
I'll do a tutorial soon. However, they take a long time to do. Each take far longer to make than they take to read/learn.
The reason I never released a tutorial or the source (except to a few people) is because I personally think the game is more important the window/button styles, and want to see people making games ;)
I didn't create the custom UI from disassembling Sierra's code. It's all very very simple code that just took me a few minutes to think up/plan out. All it involves is drawing some cels and displaying some text at the right coordinates.
|Pikachu14||Kewlies...wait a second. That reminds me of how the Gauge draws it's bar... :o|
|Pikachu14||[attachment deleted by admin]|
Use TextSize() to get a rectangle for the text then center
that rectangle within that of your button. See Brian's
reference for an example of how to use TextSize().
|Pikachu14||Nah. Calling DrawControl first then overlaying the cels is good enough...|
|Joe||Hey Pikachu14, can you send me the script you did that in? My email address is email@example.com.|
You defeated Programming Obstacle!
You get 500 EXP.
You get 3 Reputation.
You get @ Alter.
|Joe||The only problem I witness when using DrawCel, is that it draws priorities on the priority screen causing the ego to go under the screen where the buttons where. Setting the priority to something less or not setting it at all distorts them. Any ideas?|
|Brian_Provinciano||There's a little more to it that you guys probably think. I'm working on the tutorials as I write this and will try to get it done by tomorrow. Until them, work on your games themselves :) When My tutorial/sample code is released, it'll take you a matter of minutes to implement it.|
|Pikachu14||* does a happy dance for Brian *|
I've finished the new version of my custom window and custom button handlers (the old version was just a draft). I'm working on the tutorials to go with them and will then release them. They should be out tomorrow.|
While you guys wait, work on your games! Remember! The UI should ALWAYS be secondary! It's the game that counts!
Volume Two of the tutorial is up with all the stuff you'll need to make your custom GUI.|