Graphical User Interface. A term used to describe the tools available to the player to interact with the game.

learn more… | top users | synonyms (1)

1
vote
2answers
195 views

Unity 5 Dynamic Button Creation with Event Parameters

According to the documentation, you cannot instantiate buttons except via prefab instantiate. http://docs.unity3d.com/Manual/HOWTO-UICreateFromScripting.html You might wonder why we don’t have a ...
1
vote
1answer
64 views

Why does Forge not find my texture for my custom background?

I am creating a minecraft mod that improves the main menu for my minecraft server. At first I wanted to create the background, but somehow when I try to start minecraft it closes and I get a ...
1
vote
1answer
293 views

What would cause my script generated buttons and text to show in Unity and not on my phone?

I am using Unity 5 and the built in GUI tools. My static GUI shows up just fine which makes me think it's not a text/font issue or some such. Again, it all looks good in the Unity editor when I hit ...
1
vote
3answers
858 views

How to display a GUI Texture for a certain amount of time

Is it possible to make a gui Texture display for a certain amount of Time.
1
vote
2answers
649 views

Hide part of the GUITexture in Unity

I have a Health Bar in my Unity game and it's implemented as a GUITexture with gradient image from red to green. Now I can reduce it's width from max width to 0, but is still scaled gradient. ...
1
vote
1answer
696 views

Libgdx stage rendering issues

I'm using scene2d for the first time, and I can't get anything to draw EXCEPT the stage ui. Say I have my ui on top of my game screen: uiStage.act(): batch.begin(); gameSprite.draw(batch); //does not ...
1
vote
1answer
9k views

Enter Key press event detect from textbox - Unity3D - C#

i am doing a project with Unity3D . in the interface there is a textbox. once user input some text and and press enter key then i want to read the text in text box. so please tell me how to ...
1
vote
1answer
2k views

Flickering GUI on Android

New version of Unity is causing rather weird problems on Galaxy S device. The GUI starts to flicker, tear and disappear altogether at random in different screens. But this only happens on the second ...
1
vote
2answers
148 views

Informing GUI objects about screen size - Designing

I have a problem with designing classes for my game which I create. In my app, there is: class CGame which contains all the information about game itself, e.g. screen width, screen height, etc. In ...
1
vote
1answer
416 views

What's the recommended way of doing a HUD for an android game?

Basically the question is in the title. I'm creating a RTS game and I will need buttons like attack move / attack ground, etc. I am not using any engine. When people do games in OpenGL for android ...
1
vote
1answer
581 views

Nifty popup fails to register

I'm new to Nifty GUI, so I'm following a tutorial here for making popups. For now, I'm just trying to get a very basic "test" popup to show, but I get multiple errors and none of them make much sense. ...
1
vote
1answer
57 views

Creating a DPI and Resolution Independant GUI

How would one best go about it? Assuming I'm using OpenGL to do all the drawing. It seems like the best approach is to have the GUI elements maintain the same physical size regardless of the screen ...
1
vote
1answer
837 views

Unity UI Text Font Size changes with the screen resolution Problem

I am working on a project and now I have a problem . The problem is the font size. The font size is OK inside the Unity but it is really small when I play the game on a real Android device . My ...
1
vote
2answers
566 views

Chromium Embedded Framework and Unity3D?

I have recently heard about the Chromium Embedded Framework and was over-joyed as I want to use html as my GUI source. I did find a C# version but it seems to be for Windows Forms. I'm not too ...
1
vote
1answer
34 views

Help with open and close UI Menu on background mouse click

I am trying to make a point and click game in unity 5.2.2. My problem is that I need to have a UI menu to open, when the player clicks with the left mouse button on the background sprite, and it ...
1
vote
2answers
86 views

Limit buttontext to one line in Unity?

I have many buttons in my game. There are different texts on them every time. But some texts are too long and get split up into two different lines. Is there any way I can fix this without resizing ...
1
vote
1answer
99 views

How do I know what button was clicked? (Unity)

I have a prefabbed button (UI.Button) which I'm instantiating ten times: public void LayoutButtons() { GameObject newCanvas = Instantiate (canvas) as GameObject; for (int i = 0; i < 10; ...
1
vote
3answers
1k views

Why does a UI button that is child to a canvas not appear in game view?

I am trying to place a button onto a canvas background using C# script. I want the button specific to the canvas (i.e., if I move the camera to look at another canvas, I do not want the button ...
1
vote
2answers
99 views

Should input be per-frame or per-update?

I'm implementing a GUI system to look around a 2D tile-based world. At the moment, I'm updating it every time the mouse moves (which happens to be per frame, since that's when it polls for events). ...
1
vote
1answer
112 views

How do I duplicate the functionality of ugui's onClick (button component) in inspector (Unity)?

I'm trying to create the same functionality that occurs when you are working with a button in uGui in Unity. I know that I have to create a custom inspector, but i'm not sure where to go from there. ...
1
vote
3answers
1k views

In Unity, how do I make separate mute buttons for sound-effects and music?

I'd like to have a button to mute game sounds and another to stop the game music. How can I do this?
1
vote
1answer
355 views

How do I go about making a text box that allows for highlight-able and copyable text in the new UI?

I'm trying to make a simple chat system for our games lobby, however I am having issues making a text box that allows for text-highlighting. The Text component does not have interactible text, and the ...
1
vote
1answer
839 views

Unity5 UI - How to trigger button click event while preventing menu item deselect event?

So I've got a load menu using Unity's new UI system, basically just a list of save games you can select with a mouse click along with a couple of buttons at the bottom to delete or load the selected ...
1
vote
2answers
1k views

LibGDX: Scrollpane won't scroll to bottom after adding children to contained table

To my game I want to add a gui element that displays text and textButtons whenever something is happening or it wants you to make a decission (an answer while talking to a person for example). To keep ...
1
vote
2answers
618 views

Displaying scores in tutorial projects - GUI and UI

I've just started learning to use unity by working through the tutorial projects but in both roll-a-ball and space shooter I've hit dead ends in the text lessons. The lessons tell you to simply add a ...
1
vote
2answers
9k views

Changing color of UI Text in Unity into custom values

There are a few objects in the scene as well as a title. I want the title to change its text and color based on the object that is mouse-overed. The script below is added to each object that is ...
1
vote
1answer
921 views

How to make sure that all the UI elements were the same size on all screens in new Unity 4.6 UI system

I have made a HUD for my 2d mobile game with the help of the new UI system, that was introduced in Unity 4.6. But when I am trying to play game in Unity editor, the UI elements have normal size, but ...
1
vote
1answer
2k views

Generating a particle effect on top of a GUIElement (Unity)

I am working in Unity on a 2D project which is using C#. I have a number of guitextures which are hearts in order to create a sort of life meter. I would like when the player loses a heart for the ...
1
vote
3answers
3k views

Going from WPF to Unity3D, how to implement the MVVM-pattern?

I've been working with MVVM in WPF for a long time and I'm now trying out Unity3D for a GUI-driven application. Can I work with view models and bind them to properties in GUI-components? I guess the ...
1
vote
1answer
4k views

GUIText size on 4:3 and 16:9 is different

I have a text (guiText) on the screen. It shows correctly when viewed on 16:9 resolution. But it scales up when viewed on 4:3 (e.g iPhone4). I am using following ObjectLabel script to place it on ...
1
vote
1answer
657 views

Why isn't this UIButton visible in Xamarin.iOS?

I'm trying to implement buttons into my game. I noticed iOS has the UIButton class, which I tried, but upon drawing it nothing is shown. The asset image is properly loaded, I've checked this. The ...
1
vote
1answer
440 views

LWJGL Wait for key press in a single method

Currently I am implementing the possibility in my game to change the keyboard configuration. Therefor, I have a menu in which is a button for each action the player can do. If the player clicks on one ...
1
vote
2answers
299 views

Events Driven Library XNA C#

Language: C# w/ XNA Framework Relevant and Hopefully Helpful Background Info: I am making a library using the XNA framework for games I make with XNA. The Library has a folder(Namespace) dedication ...
1
vote
1answer
109 views

Unused frame(window) management

I'm rewriting my game now using software designing patterns and want to do the code, most correct I can. While implementing MVC(Model View Controller) I got a question which I would like to discuss or ...
1
vote
0answers
36 views

Minecraft Crafting GUI weird bugs

I'm writing a Forge mod for Minecraft 1.8. When I'm pressing the 'z' key a 3x3 Crafting grid should open. In the KeyInputHandler I call @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent ...
1
vote
0answers
60 views

game crash on android phone while using unity UI

I am trying to use an unity UI in my game. Initially I Created Canvas with all settings what I need then I compiled it on my phone its working perfectly. Inside the Canvas if I created any button or ...
1
vote
1answer
103 views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
1
vote
0answers
31 views

Unity: onEditEnd and onSubmit only firing from Return key

I have an InputField in my UI, but currently I can only submit its contents via the Return key. I tried mapping other buttons to the Submit action (e.g. the tab key on keyboard and the X button on my ...
1
vote
0answers
27 views

Unity keyboard GUI navigation priority

I noticed something strange while playing with my menu on keyboard. I have four items arranged in a square (i.e. the top-left item should be able to navigate to the top-right and the bottom-left). If ...
1
vote
0answers
86 views

Why are these unity UI buttons only responding to the top half?

I'm instantiating UI objects with buttons on them into a scrollrect. For some reason, all of the buttons will ignore their bottom half with the exception of the last prefab instantiated. Below is a ...
1
vote
0answers
38 views

Change gui in java game

im making a 2D Server/Client game, i have very little to no problems with the server but now i wanna work at the client. I think about using a JFrame and all the other gui classes/methods. My question ...
1
vote
1answer
157 views

Unity UI Button not working on PC build but working on Android mobile build

I am using Unity to build a game that is going to be used on PC and on mobile devices also. The problem I have is that when I use Unity UI Button, on mobile (android) is working perfectly but on PC ...
1
vote
1answer
262 views

Raycast, UI and Update Question

I have movable objects in a scene. When Raycast hits an object, I have a hovering UI that moves to a retaliative distance from the hit object. When the object is dragged, the UI's position is moved ...
1
vote
1answer
832 views

LibGDX problems when switching screens and disposing: AL lib: (EE) alc_cleanup: 1 device not closed [closed]

I have to classes which implements the Screen interface. I'm trying to switch between these screens. I'm able to switch one time, but when trying to switch back, I receive the error: AL lib: (EE) ...
1
vote
0answers
68 views

Unity Javascript GUI.Button shows up twice

Hi I have created a simple menu in Unity but I wanted to create my own style for colour/fonts. However for some reason it prints each button twice to the screen, once with my custom style, and once ...
1
vote
2answers
1k views

Camera.WorldToScreenPoint not working with perspective

transform.position = Camera.main.WorldToScreenPoint( new Vector3( origin.position.x, origin.position.y, origin.position.z ) ); I have this code on a Unity 4.6 UI object. The origin is some transform ...
1
vote
1answer
2k views

Unity 4.6: Position jumps when switching Canvas render mode from Overlay to camera in code

In the project I am currently working on I have two sets of main UI: one set that is on the screen at all times for the players use, and the second set which the player can open and look at to gauge ...
1
vote
1answer
466 views

NGUI Texture Background Font of Sprite

I am new to Game Development and using NGUI plugin free version. There are few sprite images in my game. I made them prefab and instantiated at runtime. then I created NGUI Texture and Made it ...
1
vote
3answers
287 views

how to handle interactive choice in the middle of the game loop?

I am programming a turn-based game, 2D tile-based, overhead view. I have an update function and a render function running in separate threads. When it's the player's turn, the player can e.g. ...
1
vote
2answers
1k views

Simple heart container script for 2D game (Unity)?

I'm attempting to create a simple mobile game (C#) that involves a simple three-heart life system. After searching for hours online, many of the solutions use OnGUI (which is apparently horrible for ...