Questions tagged [gui]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Compass bar icons don't appear where expected

I try to recreate the compass from Skyrim in Roblox and I stumbled upon a problem regarding quest icons. I have already programmed the directions of the world and now I struggle to program quest ...
1 vote
1 answer
100 views

Drag and drop differences between Godot 3 and 4?

I'd been following Godot tutorials to add Drag & Drop functionality to Control nodes. They've presumably been created for Godot 3.x, but my project is 4.0. And ...
1 vote
1 answer
58 views

How to get equivalent of "padding" on a button?

I'm using Godot 4. I want to increase the distance between the Button's Text (and possibly icon, later on), and it's outer edges, while keeping the "Colors" options such as "Font Hover ...
1 vote
1 answer
53 views

What's the difference between VBoxContainer and VFlowContainer?

I'm trying to build some UI for my game made in Godot 4.0. I want to make a "Toolbox" scene and need to decide what containers to use. I come from web development, where I'd use a ...
5 votes
1 answer
340 views

Draw GUI.Button on certain position on a scrollable background

Problem is in a 2D game I have a large background around 2 screens wide. And on there I got 4 buttons placed on top of background all over complete width. Now when I swipe of move my mouse around I ...
3 votes
1 answer
497 views

Create context menu in Scene view

I created some MenuItemfunctions for navigating, which are currently displayed on the menu toolbar. The C# code: ...
0 votes
2 answers
2k views

Can't see instantiated UI element

I'm trying to create a level editor for a 2D game and I wanted to instantiate radio buttons, the backgrounds and numbers of which are determined by the tilesheet I load. I'm sure I'm doing something ...
0 votes
0 answers
27 views

How to handle UI when logical and screen sizes are different?

I am programming a game in SDL2 and I am looking for advice on how to handle interactivity of UI components when the screen resolution and logical resolutions are different. Up to now I have been ...
0 votes
0 answers
44 views

How to select only inventory slots, and not deselect them when clicking somewhere else?

I'm trying to make a selection system in my inventory to do things to the selected item in a UI window using this selection system. The problem is that whenever I click on anything other than the ...
0 votes
2 answers
37 views

Unity UI button not working

I'm creating a game in unity and I can't get the UI buttons to work. Here is what I tried: Added a graphics raycaster to the canvas Added an events system with an Input System UI Input Manager ...
1 vote
1 answer
627 views

Making 2 Player UI

For practice, I'm trying to remake the character select screen from Street Fighter II. I managed get it working with a Grid Layout Group, ScriptableObjects, and some scripts to have the 1P cursor ...
0 votes
1 answer
134 views

Facilitator UI on desktop screen for VR

Hey and thanks in advance for any help/pointers The solution is probably straight forward but i am still a little inexperienced (while creating quite a few different VR unity projects mostly study ...
0 votes
0 answers
36 views

ScenePointToLocalPointInRectangle no longer works after reloading scene

I have created a GUI that floats over an object. However, when I reload the scene, the ScreenPointToLocalPointInRectangle() function does not work and acts as if I ...
1 vote
1 answer
525 views

How can I attract & repel the mouse cursor from particular UI controls?

This question came from some of my students. I wanted to share it here so others can find & improve on the solutions we've found so far. In particular, my answer below doesn't behave as well as I'...
0 votes
1 answer
50 views

GUI Using WorldToScreenPoint is Out of Control

I want to have a GUI float over a game object using WorldToScreenPoint, similar to this tutorial. However, I am experiencing strange behavior with the GUI. I assume ...
0 votes
1 answer
85 views

Delay confirmation pop-up for in-app purchase

I'm trying to implement IAP in my game where the user can buy 100 coins. I have used this video tutorial to implement the IAP and this works fine. I want to implement a functionaltiy where once the ...
33 votes
4 answers
11k views

How do you approach resolution independence in raster based graphics content?

Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. In a 3D game you might have a HUD or menu ...
0 votes
1 answer
63 views

Use Graphics Raycaster do implement pointer control VR

I am trying to figure out how to allow my players to put in a code to join a group room using photon. Unity seems to suggest using a graphics raycaster but in most sample code it uses mouse input for ...
1 vote
1 answer
50 views

Shaking UI World Space element when keeping it centered between 2 objects

So I have a ship in the game, and I can click on a Sail to make a World Space UI panel appear. The panel will follow the selected sail and also always Billboard towards the camera. The problem I have ...
8 votes
3 answers
9k views

zoom to cursor calculation

I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like Google Maps does, but I'm completely lost on how to calculate the movements. So far, all ...
0 votes
0 answers
165 views

Can you apply motion blur to UI elements in Unity?

As the question states, is there a way to apply motion blur to UI elements that are being animated in Unity? I have an animation sequence that mostly consists of the UI text. So what I am trying to ...
2 votes
3 answers
1k 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 ...
4 votes
1 answer
2k views

Resize Label automatically with the text content in LibGDX? [closed]

In LibGDX, I want to add some long text content to several Labels. I'm creating those labels in a loop, and the text content is different in each iteration. I want the ...
0 votes
3 answers
922 views

Interacting with UI with a locked cursor?

It seems like Unity has disabled UI interaction while the cursor is locked, which is frustrating because the store in my game is an actual in-world one, and thus means the player has to look at the ...
0 votes
0 answers
21 views

Scale radius used in positioning script to match UI scale

I would like to ask a question about the scaling of objects to the size of the screen. But the question is not a problem that can be solved by setting the "canvas scaler" to "scale with ...
9 votes
3 answers
28k views

How to dynamically create an UI text Object in Unity 5?

I have been searching for something that should be simple, but Unity 5's documentation on that is fairly outdated. What I want to achieve is to be able to create UI Text totally from script, i.e. ...
0 votes
0 answers
129 views

UE4 - How can I show in image using Slate?

I am working learning Slate for doing the UI. I am having a problem setting a background image. The background is all black and I do not see the image anywhere. What am I doing wrong? I have done ...
1 vote
2 answers
1k views

Getting the actual height of content size fitter parent

I have a parent gameobject (Empty) with a content size fitter with horizontal and vertical fit set to preferred size which is also a ...
0 votes
0 answers
20 views

I want to save the inactive status of the button in playerprefs. Help me

I've made several buttons whose status is inactive when clicked. I want the buttons to remain inactive even if I turn the game off and on again. How do I save this to playerprefs? I only want to save ...
1 vote
1 answer
344 views

New to Godot having problem understanding Button Group

I'm having an issue trying to understand the ButtonGroup logic, totally new to GDScript, don't have a clue of what I'm doing. Obviously is wrong. I created a scene that I saved in a folder called &...
1 vote
3 answers
809 views

What is the term for levels divided into a small number of chapters, each containing a grid of short levels?

There is a style of game design which is shared by many mobile puzzle games where a game is divided into an small number (3-10) of main chapters and each one has a grid of a larger number of short ...
0 votes
0 answers
30 views

Make player object freeze / become non-interactive when text pops up

I have a Dialogue system that shows up when a scene starts or a player touches an object. I am wondering if is it possible to make the player freeze/not interactable when dialogue pops up. I don't ...
1 vote
1 answer
270 views

Best way to make a Side Panel UI with Libgdx?

Take this image for example, the game is called Realm of the mad god, and it has this side panel filling the whole screen height with the player info. To reproduce it, Is there any way to make the ...
0 votes
1 answer
73 views

Centring content within a scroll area

I've got a Scrollbar with a dynamically generated number of entries, and I'm trying to figure out how to get it to act so that there's a lead-in of the first 3 items (example number based on the size ...
0 votes
0 answers
142 views

Blurry text in low resolution game using TMP

This could be a simple solution that my mind cant grab right now. So, I am working on a game with a specific resolution which is 64x64. I using unity latest version. as for my text I am using TMP. My ...
5 votes
2 answers
3k views

How do I create a message box that fires a callback on button press?

I need to create a message box with an "OK"-button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.
3 votes
1 answer
2k views

How can I implement UI in Unity using Chromium?

I'm looking for an alternative to UI Builder. Ideally I'd like to have basically a Chromium instance atop Unity3D which would have its JS calls somehow land in the C# (maybe in the "Update" ...
0 votes
1 answer
150 views

On a UI element(Input field) and overlay canvas how do I find the very bottom middle pos of the UI using it's height from it's rect transform?

I'm trying to place one in our field right below another, all ui belonging to an overlay canvas. I tried doing a few different ways subtracting height from different position types including rect ...
0 votes
1 answer
88 views

ScollRect Jumps while Filling

I have a UI panel with a scollrect inside, which I fill dynamically. It can only be moved vertically. When filling this scollrect, the content jumps up and down for one frame, creating a weird look. ...
1 vote
0 answers
47 views

DSL to describe (and maybe render) tech trees? [closed]

Are there any open-source instruments with easy-to-write (maybe YAML-like) syntax which allow to describe tech tree in text file and (preferably) render it by some diagram engine like graphml(yEd) or ...
0 votes
1 answer
111 views

Add buttons into List when mouse is HoldDown?

I have three buttons in my menu. What I need to do is when I click on first button it becomes the first element in my list. Now, when I keep mouse button down and move it to the second button it ...
0 votes
2 answers
3k views

JavaFX - How do I create a health bar?

I tried searching online on how to implement health bar with Java FX in a 2D side-view Java fighting game but I can only find those that goes with 'awt' and 'Swing'. The health bar I'm picturing are ...
0 votes
1 answer
198 views

Change the min width/height of a LayoutElement to scale with the screen size

I want to change the Min Width and Min Height configured in my LayoutElement so that they scale proportionate to the screen size. For example, at a screen resolution of 1920x1080, the min width is 300....
0 votes
1 answer
115 views

How to check if a custom Control is focused?

So I am building custom UI for my MonoGame project. I've gotten pretty far already, having created Controls such as: Button Panel TextBox Form ComboBox CheckBox etc. All of these controls obviously ...
0 votes
1 answer
57 views

libGDX imagebutton seeing double

If I leave my imagebuttons' width and height alone I get larger buttons than I'd like: radio.setX(wu*35); radio.setY(hu*20); When I replace/add to the ...
0 votes
1 answer
93 views

Draw a graph as a world map in UI?

What's a good way to take a graph of nodes and draw it in your UI as a map? I already have a graph and I'm happy with how it's generated. However, it doesn't have any positional data for the nodes -- ...
0 votes
2 answers
416 views

Is it possible to move Overlay Canvas away from (0,0,0) in the Scene View?

In our workflow we use a Screen Space - Overlay canvas for UI. The only problem with it is that you can't change it's position (...
1 vote
1 answer
287 views

Problem with placing isometric tiles above and below each other

In unity when using the in built tale palette to place tiles into the scene, I have come across a small problem. Im using an isometric tile-map and whenever i go to place a block, I end up placing a ...
0 votes
1 answer
115 views

Should UI systems update naively with events and data from outside, or should they be coupled to some game state/singleton to know to change itself?

I'm making a game in Unity for my game dev course in uni. I hope the question isn't too confusing but I have bolded sort of like a TLDR at the bottom. My level currently has a pregame UI panel, to set ...
0 votes
1 answer
237 views

Unity 2D UI Scrollview Stretch settings not staying

So I'm trying to make a Scrollviewer and inside that will be aload of boxes stacked on top of each other (the boxes have information in them - like the boxes in this screenshot here but they will ...

1
2 3 4 5
14