Graphical User Interface. A term used to describe the tools available to the player to interact with the game.
3
votes
2answers
344 views
Is there an alternative to VBOs or deprecated functions to draw many small quads?
I was thinking about how to program a user interface in a 3D game. The problem is, immediate mode (glBegin and glEnd) is deprecated for a long time but I don't think vertex buffer objects (or arrays) ...
0
votes
0answers
20 views
Visual effects in Java? [on hold]
I'm about to work on mini game right now. I use eclipse and was wondering if there's any library thet would let me achieve visual effects like fade in, for example when clicking something in a game ...
0
votes
2answers
143 views
Can the GUI be used to create game objects?
I want to be able to position 10 various game objects (sprites) within the area of the screen which will be dynamically sized accordingly to the screen size of the device. The area in which I want to ...
1
vote
1answer
69 views
How can I position a sprite in the same spot across different screen sizes?
Taking into account the multitude of screen sizes and resolutions, is there a way I can position a sprite so it's at roughly the same spot on every iOS device?
Doesn't matter if you are using ...
1
vote
1answer
121 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 ...
0
votes
2answers
56 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
14 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 ...
0
votes
1answer
77 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
77 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
379 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
629 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
61 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
84 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
54 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
460 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
338 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 ...
5
votes
2answers
6k 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
412 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
608 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
183 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
243 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
257 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
61 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
171 views
touch in guiTexture [on hold]
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
128 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
345 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
269 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
995 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
587 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
840 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
313 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
285 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
249 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
2k 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
638 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
45 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
150 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
183 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
209 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
616 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
194 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
142 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
55 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
299 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
90 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
268 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
113 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
692 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
122 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 ...