Tagged Questions

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

learn more… | top users | synonyms

0
votes
2answers
40 views

GUI Text counter Skips numbers after a few seconds

The counter counts perfectly up until the first bump. After this it starts to add about 4-5 "points" instead of just 1. using UnityEngine; using System.Collections; public class GameController : ...
0
votes
0answers
10 views

Using fonts in Scene2D GUI

I'm learning how to use Box2D and Scene2D together. I'm trying to create a Sprite class that combines a Box2D body with a Scene2D actor. Before I can do this I need to set up the environment I plan to ...
-3
votes
0answers
46 views

What software or pipeline does Blizzard use to design their games' GUI? [on hold]

A lot of Blizzard games' GUI use metal textures and have animated gloss/speckle effects. Those can be seen in, for example, achievement-unlocked popups in WoW, SC2, and D3. In terms of UI development, ...
0
votes
1answer
24 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 ...
0
votes
2answers
62 views

Scaling a GameObject for a progress bar representation

I am trying to implement a progress bar system for my game. I know that it could be done with Unity's OnGUI and scaling with width of the texture but I don't want it to be a GUI element because in my ...
4
votes
1answer
162 views

Consume input events in Unity 4.6

How do I consume the input events in the new 4.6 unity gui system? If I click on a button for instance I don't want anything else non GUI related that might be listening for mouse input to react to ...
3
votes
2answers
621 views

How to make a scrollbar?

I am making my own UI for my game, no libraries used, basic UI with simple controls and I am almost done. Now, let's say I need to display lots of information, controls or items which obviously won't ...
0
votes
1answer
59 views

Spawning a Sphere and trying to move it [closed]

I've been trying to build upon a blog post on Gamasutra http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php In this I would like to spawn a ...
0
votes
2answers
71 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. ...
0
votes
2answers
53 views

How do I attach UI data to logic data?

I'm attempting to write an inventory system(C++, doesn't need to be huge), that later on should be able to be drawn in a GUI. In the file structure, I think it would be best to put both information ...
2
votes
2answers
187 views

Detecting mouse clicks in Unity UI Beta

I want my game script to detect mouse clicks everywhere on my screen, except one corner where I have a pair of buttons to control the sound and will be handled separately. To help identify this ...
3
votes
2answers
235 views

How to design a drag and drop inventory system with transition from icons to game objects?

I’m trying to write a simple 2D game in Unity with an inventory where the user can drag and drop different objects on the screen. I need the inventory to contain icons which on drag will become ...
4
votes
1answer
4k views

Unity 4.6 GUI - Dynamically change the functions called by GUI elements

Looking to dynamically change the value in the button OnClick and slider On Value Changed . If I had to guess on how this was done, get a reference to the button/gui element. Next get the Button ...
0
votes
1answer
343 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 ...
0
votes
1answer
387 views

How can I create a button with an image in libGDX?

I am new to LibGDX. I am trying to develop a game for Android (so it will support different screen sizes), but I don't know how to put a button with an image. I tried ImageButton but I can't resize ...
0
votes
2answers
145 views

How to show a float with no decimals [closed]

I want to show the current health and stamina of the player using GUI.Label. All is working fine however it shows the values with decimals to the millionth (example: ...
2
votes
3answers
196 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.
0
votes
1answer
201 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 ...
0
votes
1answer
57 views

SDL Surface clipping mask

I am creating a GUI for my game, so I use some buttons like . So you can see it is only text surrounded by a rectangle. But I currently use a huge png image with all the buttons I need arranged as I ...
0
votes
1answer
141 views

touch in guiTexture

Before time in my game start. i want there will show a guiTexture.. if i touch this guiTexture, that will hidden and the time game will start. I try to make a script but it doesn't work. I'm a bit ...
0
votes
0answers
108 views

hide and show many guiTexture

in the 1 scene there are many guiTexture. So how to write this code ? public class guiTanya : MonoBehaviour { public GUITexture guiA, guiB, guiC, guiD, guiE, guiF; void onMouseDown() { //if i press ...
0
votes
1answer
301 views

Unity Gui from text file templates

I've been banging my head against a wall this past while over how I might create menu's and menu components in unity from text file. I would normally just build my own extended panel/label classes etc ...
0
votes
1answer
247 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
2
votes
1answer
803 views

How to match font size with screen resolution?

So I'm working on a game using LibGDX, and I have a problem. To make my game fit most resolutions, I created a base asset for each aspect ratio, for example, a main menu background image, I made it ...
0
votes
1answer
505 views

SDL2 window as child of Win32 GUI

I'm building an editor. Is it possible to create a child window of SDL2 within a Win32 gui? (The most obvious page from SDLTutorials works for earlier versions of SDL)
0
votes
1answer
693 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 ...
0
votes
1answer
252 views

Libgdx actor bounds are wrong

The Actor's boundaries are not centered at the ButtonText but I used the setBounds() method. The higher the Y position is, the less centered is the boundary. The weird thing is that i only created ...
1
vote
2answers
238 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. ...
0
votes
1answer
231 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
0
votes
2answers
1k views

Prevent GUI Clickthrough

I'm using NGUI to setup my UI in Unity. Attached to the MainCamera I do have a script to rotate the camera view by clicking and dragging. It does handle mouse events using Input.GetMouseButton(). ...
2
votes
1answer
587 views

How to correctly set window size in Libgdx scene2d.ui dialog

In my libGDX application I am using the scene2d.ui classes to render my game's GUI. One of the things I render via these classes is a dialog window with a background image set. I have created the ...
0
votes
0answers
38 views

Keeping relative size with different resolution

I'm making a GUI system and want the components having a konstant relative size, even if I'm changing the resolution. Since I'm using the relative OpenGL coordinates to place them, there is no ...
-2
votes
1answer
145 views

Why is my Snake' tail rendering the wrong sprite? [closed]

I am making a snake game in Unity. The game is simple, using Texture2D to display the head, tail and body parts. I am stuck with this problem: I stored 4 textures (each one for one of the four ...
2
votes
2answers
174 views

Print on the GUI in Unity

I'm trying to show the players name on the GUI with a label. GUI.Label(new Rect(10,10, 100, 30), playerName); Instead of use the default style I want to use a different font with larger character. ...
1
vote
1answer
189 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 ...
2
votes
3answers
569 views

SharpDX/D3D: How to implement and draw fonts/text

I am playing with SharpDX (Direct3D for .NET) without using "Toolkit", already finished with basic rendering 3D models. But now i am wondering how to program/create fonts for game (2D), or how to ...
1
vote
1answer
2k 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 ...
2
votes
3answers
192 views

How can I model a “weapon overheating” mechanic?

I want to create a weapon overheating system very similar to the plasma rifle in Halo. You can watch a video of the plasma rifle firing. What I want to do is to create a flexible logic that can be ...
2
votes
2answers
140 views

Should widgets be part of a scene in a 2D game?

I'm in the middle of separating logic and drawing of a 2D game, i.e. I'm moving from scenes/entities that draw themselves to scenes/entities that merely store and update data, getting drawn by a ...
1
vote
0answers
54 views

Pencil GUI design for Game Development [closed]

Does anyone know if there are any game-development related stencil collections for the Pencil GUI designer, or whether there's a more appropriate tool for this job? I just want to be able to quickly ...
0
votes
1answer
287 views

OnClick events - using Scaleform UI with Cryengine 3.5.4

I've created a UI in Flash, set up an xml file for it and designed a flowgraph to ensure it displays when I launch. However, clicking on the buttons doesn't appear to do anything, despite me writing ...
0
votes
2answers
89 views

string on GUI.Button not showned

I am sure that inventoryItem.Name contains "Wood" cause i see it when i add a breakpoint. Still i get nothing in the game. Just empty buttons. void DrawInventoryContent (int id) { ...
1
vote
1answer
247 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 ...
0
votes
1answer
110 views

Variable number of GUI Buttons

I have a generic HTML5 Canvas GUI Button class and a Scene class. The Scene class has a method called createButton(), which will create a new Button with onclick parameter and store it in a list of ...
0
votes
1answer
644 views

Unity GUI not in build, but works fine in editor

I have: GUITexture attached to an object A script that has GUIStyles created for the Textfield and Buttons that are created in OnGUI(). This script is attached to the same object in number 1 3 ...
2
votes
0answers
118 views

1:1 mapping of texels to pixels with DX11 and multisampling and linear interpolation

Is it possible to get a 1:1 mapping of texels to pixels on a multisampled target in DX 11 with interpolation? It seems to me that the texture coordinate used in the shader is always one of the ...
1
vote
0answers
237 views

What's a good C++ game engine for beginners? [closed]

I'm looking for game engines. I'm not looking for things like OPENGL, DirectX, or Irrlitcht; those are game libraries? Also can it be C++ native code? So any good ones out there?
9
votes
2answers
904 views

Entity/Component System and UI “Entities”

I'm still green to entity/component systems. I find that since I have useful components for drawing sprites (or spritesheets) and handling input (mouse/touch clicks), I naturally want to reuse these ...
2
votes
2answers
125 views

How should I provide a navigation system for a world with infinite space?

The world is generated by perlin noise chunks and will only be saved once that chunk has been generated. It will also not necessarily have one obvious (to the user) central point anywhere in the ...
1
vote
1answer
254 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 ...