May 23, 2012, 12:08:49 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: custom template creation  (Read 1343 times)
ANDROMEDA FRAME
Jr. Member
**
Posts: 72



View Profile
« on: January 12, 2009, 12:04:28 AM »

if i want to create a new menu template, is it as easy as creating it in photoshop, and adding it to the directory for use or is there more to it than that?
i suspect so, since i have tried to modify the existing one (a copy actually) in PS, and it mucked it up.
it occured to me that i may have to adjust the parameters in the menu editor.
any tips to save me a dozen hours in trial and error?
i tried looking in the documentation, but that is an exercise in futility at this point.
Logged

How on earth can you surmise what my emotions are by reading a simple statement I have written?
To claim this ability without actually knowing me is dishonest, misleading, and unfair.
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #1 on: January 12, 2009, 12:27:46 AM »

If you put all your new gui elements exactly the same size and location they are in the interfacetemplate.psd, you would not have to modify any code.

If you use different size and location of the gui elements, then you need to remap the points in the interfacetemplate.lay file. Basically its defining x and y starting and ending points.

I would make a whole gui modification project and modify it in there so the originals do not get out of wack. Also - they new gui editor in gamecore may make this alot easier, but I have not used it yet - I got used to hand coding it and have just stuck with what works for me.
Logged
ANDROMEDA FRAME
Jr. Member
**
Posts: 72



View Profile
« Reply #2 on: January 12, 2009, 12:42:02 AM »

thanks, buddy.... Grin
i'll give it a shot...if it works out for me, i'll post the process for others such as myself (you know, the ones who are clueless, lol...).
at the rate of completion the documentation is taking, it will probably be helpful for any who are stuck on that and want to move forward.

i really like what you have accomplished by the way.....inspiring to us all, i'm sure (at least it should be!).
Logged

How on earth can you surmise what my emotions are by reading a simple statement I have written?
To claim this ability without actually knowing me is dishonest, misleading, and unfair.
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #3 on: February 07, 2009, 02:45:27 PM »

Dudes, all you gotta do is open the menu editor and play with it. There's no need to hand code anymore, trust in good old trustworthy Squat on this one. Ok, you do still write code by hand, but you can do it in the editor, just add the advanced parameters like OnPress and doing, script window! Looks like it don't take inputs, but it does.

The only thing I can't figure out yet is how to load in an icon image onto a form and put it exactly where I want it to be through script. Well, I'm lying I can do that, but I can't get it to move to another spot yet based on the code. I can hide and unhide them but if I wanted a rolling inventory with them moving all over, I'd be lost right now.

I'm used to coding 2D interfaces, generally speaking it's a lot like Flash. But we don't have a direct timeline and I think there's a leap of faith in dictating which "sprite" you're trying to access. I can't see how to figure it out quite yet, but I'm still stuck on something else.

Just don't forget the most powerful tool in the menu editor, and that's "CLONE".

BTW, i put up a completely custom menu interface example eons ago featuring a script for customizing a giant M16 that's in the world. That wasn't a demo kids, them's was the real files and all the .psd's to boot. Should I bother providing people with examples anymore? Are people even looking at them? Did you learn anything? I have yet to field question one.

In the end, it's "about" as easy as creating it yourself in Photoshop. However, if you want to have nice rollovers and really good stuff, you have to do things somewhat the right way. While you CAN crop an image in PS, you get all the other crap too, so a button would now be locked into position. Considering PS's natural capture of the alpha channel, why not just export the buttons as smaller, separate images with their own transparency and move them about in the menu editor using the position sliders? Now you can put that button anywhere and even give it a shadow. If you build in Photoshop with planning and intelligence for all the elements you need and spend due care to export them each properly (at their right sizes), you should have a pretty easy time controlling it in the editor. Every button in the samples has script on it that you can look at...most just hide and show forms and load and unload worlds, but you have COMPLETE script access at that level to the whole rest of the game, so do whatever you need in your menus. Look at Gary's Mod for the kinds of things you could think up to control in a menu.

Lastly, there's no coding involved in moving things, resizing them or cropping them. There are sliders in the menu editor for all of that. You in no way have to match .psd sizes. Though you certainly could. The hardest thing to realize at first is that each element sits within its parent element and is in position in relation to that parent. So a picture box that's on the right, inside a menu form that's on the left will be in the middle of the screen. If you're having trouble moving something that you want to, you may need to adjust the size or position of its parent item in the list of elements you get for each menu. You can clearly see the heirarchy sub-tree and you can also drag it around to alter it.
Logged
gekido
Guest
« Reply #4 on: March 02, 2009, 09:33:13 PM »

The trick for positioning is using Panels - they are invisible by default and if you give them a size, they can be used very effectively as spacers in UI layouts.

You can use them to group objects, etc and very quickly put together just about anything you can imagine, layout-wise.

With panels and autoplacement settings you can create just about anything you want with the menu editor.

The trick for icons and so on is to use PictureBox controls - they are basically just icons / images and can be easily replaced / modified using the SetPicture function.  You can add a picturebox as a child of a button and place it like it was placed in a groupbox or panel and then modify the mouse over and mouse exit events to change the pictures appropriately.

For button rollovers, this is done simply using the different state sprites, same as the default template does.
Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!