80
votes
Accepted
What is the difference between a HUD and a GUI in a game?
I'd argue that HUDs are graphical user interfaces: they're ways to present information back to the user graphically.
In contrast to what some other answers say, the term GUI doesn't require that ...
26
votes
What is the difference between a HUD and a GUI in a game?
Interactivity.
A HUD is not interactive: it displays information only, it cannot be clicked, dragged, closed, etc.
A GUI in a game is like any other UI: it is interactive. It has menus, buttons, ...
23
votes
Accepted
Unity new UI - Dynamically change the functions called by GUI elements
There's a super simple way to change events:
EDIT
See my other answer for the quick and easy way to add an event for the OnClick event only. For other events, ...
19
votes
Accepted
How to match font size with screen resolution?
It's easy: Fonts do not need to match resolution, they need to match pixel density.
Pixel density is measured as pixels per inch(PPI), or pixels per centimeter. There's also a measure unit called ...
16
votes
Accepted
Button stays highlighted after being clicked - Unity3D 4.6 GUI
The Navigation property of buttons is set to Automatic by default, allowing you to navigate through buttons using arrow keys.
...
15
votes
Accepted
Unity UI square that fills width OR height
Finally I found a way to do it (tested in v5.0.0), in a way that:
Does not need code, or conditionals to check orientation.
Does not hack with scales and neither needs a reference resolution.
In the ...
13
votes
How to create gui image with script
Its entirely possible. Here's a simple script showing how.
...
12
votes
Accepted
How to detect mouse over for UI image in Unity 5?
You can implement IPointerEnter and IPointerExit interfaces and keep boolean for 'over state':
...
12
votes
Accepted
How to make curved GUI in Unity?
Here's a strategy for making arbitrarily bent UI: we'll render our UI into a texture (in realtime, not as a baking step), and then map that texture onto whatever mesh we want.
Here's how I made this ...
12
votes
Accepted
Running into issues with Unity Vertical Layout Group
Alright my dude. Welcome to the hell that is layout groups. Here's a few things you'll need to know first:
If nothing is sizing the object, the layout group will not work as you expect (in fact it ...
11
votes
Unity new UI - Dynamically change the functions called by GUI elements
The word is that the delegate{} syntax found in my previous answer is obsolete, there is another way of doing this using lambda notation:
...
11
votes
Accepted
How can I round out the corners of a quad in OpenGL?
This is not technically an answer to your question, but is a better work around in my opinion.
You can pass the dimensions of the boxes and the radius of the corners to the fragment shaders and round ...
11
votes
In OpenGL, is it a bad idea to "combine" immediate mode and retained mode for the sake of GUIs?
I personally only see it as being bad for two reasons:
It is very outdated and deprecated. And,
It is much slower than the modern ways of drawing with OpenGL.
But, if it's working out, and ...
9
votes
Accepted
How to dynamically create an UI text Object in Unity 5?
I think what you are looking for is something like following:
...
8
votes
Changing color of UI Text in Unity into custom values
You can do this with the code below:
title.color = new Color(254.0f/255.0f, 152.0f/255.0f, 203.0f/255.0f);
8
votes
Accepted
In OpenGL, is it a bad idea to "combine" immediate mode and retained mode for the sake of GUIs?
It is a bad idea insofar as it is nonsensical. There is nothing to "set up" that you have not already done, except for an ortho projection matrix (which you will have to do in any case).
Portability ...
7
votes
Accepted
How to make a scrollbar?
Let's call the content you want to scroll content and the viewable area of that content viewPort. Your ...
7
votes
UNITY : I want to make my UI text fade in after 5 seconds
Here is a rather simple extension class that you can use.
...
6
votes
Accepted
How to show a float with no decimals
Don't forget that every object in .NET has a ToString() method. Many of the built-in value types accept an optional formatting argument; numeric types in particular ...
6
votes
Accepted
Custom Editor - keep default look but add more
Call this function from inside OnInspectorGUI method to draw the automatic inspector. It is useful you don't want to redo the entire inspector, but you want to add a few buttons to it.
http://docs....
6
votes
Accepted
How do I set the exact local position of a RectTransform?
First of all, ensure you set the parent before setting local position, then, you have two options according to the type of Rect Transform : non-stretching and stretching ones.
For a non-stretching ...
6
votes
Accepted
How can I render an OpenGL scene into an ImGui window?
First you need to render you scene to a Frame Buffer Object (here is a good course on FBO: https://learnopengl.com/#!Advanced-OpenGL/Framebuffers)
After that you will end up with a Texture (of type ...
6
votes
Accepted
How can I apply a Camera Shader to UI?
The default behavior for Unity's UI is to draw after the post-processing effects have been applied. This is dictated by the Render Mode setting on your scene's <...
6
votes
What is the difference between a HUD and a GUI in a game?
Is a HUD part of the GUI and just displaying information?
Yes. Head Up Display (as the name suggests) is just to display information while you are in-game. However in some scenarios HUD may be ...
5
votes
Accepted
Entity/Component System and UI "Entities"
After using several entity-component systems, especially CraftyJS, I more or less got the answer to my question: yes, you can reuse components (especially sprites or images and mouse-click handlers in ...
5
votes
How can I create a button with an image in libGDX?
You have the freedom to create your own button class, attach to it a sprite, make some methods to handle input and you're good to go.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
gui × 676unity × 415
c# × 144
java × 41
ui-design × 37
c++ × 32
2d × 29
opengl × 28
libgdx × 28
text × 28
android × 17
unity-ui × 17
input × 14
xna × 11
animation × 11
rendering × 11
interface × 11
menu × 11
architecture × 10
mouse × 10
ngui × 10
3d × 9
shaders × 9
game-design × 9
unityscript × 9