Jump to content

Simple Image-less UI


Krankzinnig
 Share

Recommended Posts

Well, if using DrawRect() all you have to do is Bind() a texture before hand and DrawRect() paints your texture instead of a plain colour value. So there's plenty of scope for using plain drawing functions as described by an XML file with textures if you want to do that.

 

I have a hard time with all the event stuff that has to go with it. Actually it's so bad I want to stop thinking about it now and go out into the sunshine and try and fix the car.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

9 Images for each element, is there a link where I can read about that method?

Top left, top (stretched across), top right, middle left, center, middle right, bottom left, bottom, bottom-right.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

As I have stated before, its all about a blend of images and using these primitive 2D drawing commands. This way your not using a huge image just for a box. I got another example here that might illustrate what I am talking about better:

 

UI%20Example.png

 

This is now fully functional UI. You can drag it around by the title bar and the button responds. I have this thrown automatically on errors with a corresponding error code so my team can handle support issues easily. For my in game UI I am using a minimal compass svg image and some other basic info. My inventory and etc will all be drawn as the dialog is.

AMD Phenom II X4 B55 3.20 GHz - 8.00 GB Patriot Gamer Series RAM - AMD Radeon HD 6800 Series 1 GB GDDR5 - Windows 7 Professional 64 Bit

Link to comment
Share on other sites

This way your not using a huge image just for a box

 

I think you have the wrong impression about the 9 image way of things (which I guess is what I was referring to). You would never use a huge image with that technique. It would be made up of smaller images that get tiled/stretched/whatever other tricks you can do to make what looks like your huge image.

 

You GUI looks nice, but your games theme seems to be more fantasy and the GUI is kind of more futuristicish/OSish.

Link to comment
Share on other sites

With the approach I am describing, the top-middle, middle-left, center, middle-right, and bottom-middle images would get stretched horizontally, vertically, or both, depending on which section it is. That was you can have gradients or whatever, and they will fill the entire area of the element. The advantage is you can make your GUI once, then an artist can reskin it to make a theme appropriate for any game. This can be used to make interfaces that look more like a game interface:

 

post-1-0-33203200-1304017004_thumb.jpg

 

Code once, infinite reuse.

 

Alternatively, you might choose to tile the edge and center images instead of stretching them.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Yeah I get your point but think about Valve, they have a really clean UI for login, error dialogs, notifications. This is what this class is for. In no way shape or form would it replace the in game UI or any other visually important UI. Basically, my main menu wont be a rendered rectangle with text. Its going to be a pretty image based layout as seen above in the screenshot Josh posted. But I don't see the need for a overly flashy box to tell the user they are missing a dll file. I guess using the word UI was too broad, they are more or less my notification dialog's. You know, the ones your not constantly staring at.

 

Btw, almost done implementing my SVG loader woo!

AMD Phenom II X4 B55 3.20 GHz - 8.00 GB Patriot Gamer Series RAM - AMD Radeon HD 6800 Series 1 GB GDDR5 - Windows 7 Professional 64 Bit

Link to comment
Share on other sites

Yeah, I think we understand what you are saying too, but then what you are doing is almost making 2 GUI's. One for development and 1 for the game when you could use the one for the game as your dialog also (the skin for that would just be lines so it looks like what you have). That way you are reusing your 1 way of doing a GUI to satisfy both needs.

 

Valve's GUI is clean but if you say that same GUI in 3 of their different games you'd probably be like wtf :) Also it kind of fits their game theme.

 

Anyway what you have looks nice.

Link to comment
Share on other sites

Yeah, I am producing multiple titles with a team. So we will reuse the dialogs but change colors and icons. So keeping that UI class in the engine is really handy. Also thanks for the compliment.

AMD Phenom II X4 B55 3.20 GHz - 8.00 GB Patriot Gamer Series RAM - AMD Radeon HD 6800 Series 1 GB GDDR5 - Windows 7 Professional 64 Bit

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...