Poll

Did you find this helpful?

Yes
No

Author Topic: [Tutorial] Making a Gui  (Read 45114 times)

honestly these things need a sticky
 :cookie:

I put this thread on the elevator and went at the highest floor.

I can't change the target with Windows 7 >:C

I can't change the target with Windows 7 >:C
I'm on W7 and it works fine for me.
snipping tool ftw

This helped only a bit.
The best part of making a GUI
Not making a window for it. Also making a custom botton is nice.
What ever.

Light and Day, stop being a show off, and
stop
going like
this.

:(

It says "mission editor cannot execute file: new/mission.mis

:(

It says "mission editor cannot execute file: new/mission.mis
When you load bl?

well that helped alot but how do i do this i loaded the admin gui to add to it and i need to know if i press a players name then press my button lets say its kill so it killes the player how would i do that and it opens and all that but not to key bind oh well it said errrors were in it then it fixed them for me edit ok so i have this
Code: [Select]
exec("./adminGui.gui");
moveMap.bind(keyboard, "m", pushTestgui);

function testcommand()
{
MessageBoxOK("Thanks!","You have just pressed a button on a test GUI!");
}
what would i replace messageboxok(text) with to kill the player or delete or jail
« Last Edit: June 27, 2010, 10:39:52 PM by deathrider »

I have decided that I will update this within the next week (or couple of weeks, hopefully, my hard drive failed and I don't have a computer with Blockland).

I will make a  lot of improvements over the original tutorial and either repost it or edit this topic. I feel this tutorial doesn't deserve a sticky... yet...

Thus the coming update. I want  the mod community to be able to rely on a quality GUI tutorial so GUI's don't end up looking like the one in the example I made. I've been wanting to update this since when I made this, I too was just beginning GUI's and I am better not only at creating GUI's, but I am much better at scripting and programming than I was back when this tutorial was originally made.

I will post more information about the update later, when it's not  12 AM.

Edit:

Not  12 AM anymore.

I have some ideas as to what I want to improve and add to the current Tutorial, but I think it would be better to allow you guys to tell me what you need help with. Post your ideas in this thread and I'll try to cover most of  the ones I think are worth the effort.

I want to include topics like key binding, creating custom bitmap buttons, creating custom controls (I believe this is possible, can't check yet) and more. But I really want your feedback.
« Last Edit: August 03, 2010, 02:29:08 PM by AGlass0fMilk »

Bump, read above edit ^^^

Any suggestions people? Anything you want to know how to do? Anything you think other people should know how to do?

Any suggestions people? Anything you want to know how to do? Anything you think other people should know how to do?
Sorry if you mentioned this already; I'm a bit hasty to know. How do you change an already-existing GUI at start-up? Like, say, I would like to change the MainMenuGUI to something I made. How would I do that? FYI, it's a complete GUI; I wouldn't want to overlap my GUI on top of the existing one. I'd like to wipe it before I put anything there.

I dont think it's a very good idea to remove the main menu GUI completely, but I will cover adding (and if possible, removing) pieces to (/from) a GUI.

If you must know now, I'll tell you that you can add controls to a GUI by using something like this:

Code: [Select]
$NewCntrl = new CtrlType(CntrlName) {
                        profile = "GuiDefaultProfile";
                        horizSizing = "right";
                        vertSizing = "bottom";
                        position = "0 0";
                        extent = "310 335";
                        minExtent = "8 2";
                        visible = "0";
                        color = "50 50 50 128";
};

CntrlName/WindowName.add($NewCntrl);
Note that you can add the new control to either a named Control (like a scroll bar) or to the window it self


I don't know if there is a remove(); function, but there might be. Try dump()-ing some GUI's to see what methods they have.

Computer version doesn't matter. If their Blockland path has spaces in it, then you need the quotations or it won't work. XP Just so happens to install into Program Files by default, which has spaces, where Vista doesn't.
I have Windoodle Seven and I throw all my fecal matter in %PROGRAMFILES.