aditya
November 2, 2024, 6:20pm
1
Square-Fall.zip (2.4 MB)
I followed the Square Fall tutorial by ShapeShift Games YT channel. After, I updated the defold version, I am unable to set the color of play button in the start screen of this project.
In the earlier version, it was working fine but now it is showing white. Although the rest of the functionality of acquiring input focus works.
What am I missing here?
britzl
November 2, 2024, 7:51pm
2
How are you setting the color?
aditya
November 3, 2024, 5:44am
4
In start.gui_script, in the line 12 :
gui.set_color(self.play_button, data.color_two)
This should have worked.
aditya
November 3, 2024, 5:45am
5
I will make a new project and do it all over to see if it works or not.
aditya
November 3, 2024, 7:49am
6
Square-Fall_Again.zip (1.5 MB)
I made a new project again. And the same issue is happening here as well .
I don’t get it. The color of play button is same as text-1 label color and yet it doesn’t appear in same color in the build.
What am I missing here?
britzl
November 3, 2024, 8:07am
7
It works for me with the project you attached:
What if you change the data.bg_color to something other than that almost white color?
Also, do you have any errors in the console?
Finally, what kind of GPU do you have?
aditya
November 3, 2024, 8:33am
8
I changed the value of data.bg_color. The button still doesn’t appear.
There are no errors in the console.
I am using an MSI GF63 laptop with Nvidia Gtx 1650 Max-Q.
aditya
November 3, 2024, 12:52pm
9
Square-Fall.zip (2.4 MB)
UPDATE:
So, I tried pasting the “replay button” in “start.collection” and “play button” in “gameover.collection”.
Turns out, I can see the play button in gameover screen. But I can’t see either of “play” or “replay” button in start screen.
So, there is some issue going on in “start.gui”.
Yet to figure out what it is.
Check the colors of box nodes in start.gui. Maybe one of them isn’t set to “white”.
aditya
November 3, 2024, 3:27pm
11
All of them are set to white. In both start.gui and gameover.gui.
I added an extra box in start.gui and gameover.gui. It is visible in gameover.gui but not in start.gui.
So, there is some difference between the Nodes section of both. I am unable to figure out what that is.
Are you using a render color?
aditya
November 3, 2024, 4:06pm
13
There is a custom.render_script that I am using.
aditya
November 3, 2024, 5:00pm
14
So I tried adding a blank box under the node, and it is visible whereas play_button and replay_button are still not visible.
So, is there a problem with atlas or textures?
britzl
November 3, 2024, 9:27pm
15
What if you do Project->Build HTML5 ? Does the HTML5 version work? Can you please also confirm that you are using the exact project in the above zip file which works for me an Potota?
aditya
November 4, 2024, 4:37am
16
Yes, I am using the exact same project as this one.
Also, the play button did show up on the html5 build but not on normal build.
Here, is the screenshot:
AGulev
November 4, 2024, 6:21am
17
1 Like
aditya
November 4, 2024, 7:37am
18
Nope, its an Nvidia GPU, GTX 1650 with Max-Q. My CPU is from intel though, a core i5 9th Gen.
And, just to make sure, you don’t have an integrated Intel GPU?
aditya
November 4, 2024, 10:08am
20
I do have an integrated GPU from intel but my assumption is if anytime, I would open a game or a game engine, it should be using the Nvidia GPU and not intel one.
Ok, when I opened the engine. I saw the spike for the Intel GPU and nothing for the nvidia one.
1 Like