65 Replies
I've told you already, nobody would be able to help you with merely a video. You need to share code and full details
we don't even know what is wrong
$details
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
this problem
is not from the code
from the start
it makes this like blinking
but i dont know why
but its not from the code
and i am wondering how to fix it
but here is the code
just to be sure
i want just to say
before anyone judges
i am trying to learn
so my code is not organized and logic is bad too
but its working
for now
What do you want to happen that isn't happening in that app of yours?
Rock counter is jumping all over the place, do you want it to increment by 1 when you click the rock or something?
if you have watched video you can see that is bl9inking i am using windows forms
cuz i dont know how to use unity still
but
i dojnt know how to fix this
Nothing is blinking though
mb my englih is not good
but i mean
when i close the upgrade scroll
Do you mean the window on the left is flashing white when it closes?
you can see
YEAH
and when
lets say
it goes to big number
starts to do it again
Do you run some code like
form.Close()
?no
its just
visible
true and flase
false*
where did you saw rock counter btw?
do you mean just rocks?
Top of the screen
Which method is called by that close button, the one with the <| kind of shape
let me check
i just
use this
Which button calls
button5_Click
?
I suspect what happens is you set the width to 0 after you hide everything
Forms draws a white background by default so maybe set the width to 0 in panel14_Click
ok let me try
its the same
Either that or in the constructor, put
nothing changed
Then add this method
whre is the constructor
public Form1()
Also add this.TransparencyKey = Color.Transparent; // I had to add this to get it to work.
below the this.BackColor partthis
Yeah
put the code below the InitializeComponent
ok
let me try
Then add that method below the constructor
Constructor is just a regular method except it's called when you use the
new
keyword
Constructor as in a method that constructs the objectReplace the ; with {}
mb
xD
ok done
let me check
If that dunna work then i'm not sure
YOU ARE FUCKING HERO
HOW TF YOU DID THAT
You definitely wanna name buttons instead of using things like button1, etc
you are too good
White background by default so you just set it to transparent
you saved me
but i have one more question
which is the easiest way to learn how to use
unity
cuz i tried
but
its very diffrent
from windows forms
Unity vs windows forms you mean?
yeah i trie to switch
i want to use
unity
They're 2 very different things but winforms is definitely a ton easier
yeah exactly
but
Unity has the weirdest GUI system
unity
better
and the biggest problem
in unity
is that
i dont know how to combine the code
like here
is everything
together
Unity lets you customise the look of any control you want but windows forms doesn't let you do it so easily
but there is everything seperate
yeahz and i can doo animations\
and stuff
I'd learn something like WPF, or if you want to do other platforms at the cost of a bigger headache, Avalonia
If you use the .NET Framework version of WPF, it has a designer so you can pick and place controls on the screen
You can make any style of button, text box, or even you own controls that look however you want
yeah but do you know how to do the code in unity
Unity is a game engine so UI stuff is only the small part
like to combine it
all together
I've made a few UIs in unity but i dunno what you mean by combine the code
like in windows forms
i write the code for everything
like buttons
panels
together
and i cna use the variables
but
in unity
i have to create scripts
for everything
seperate
like scri[t for ecery button
and i dont know how to use the variables
in other scripts globaly
Different workflow then I guess, when I did a UI, it was some really cheeks, you do stuff like
UITool.Button(10, 10, "Click me!", whateverElse)
Oh wait C# scriptsyeah
I didn';t know you could attach them to a button or whatever
Never done that
But I can see how that might work though
if i knew
how to sue
use*
the variables
globaly
it will be diffrent stor
story*
I'd still rather write a UI in WPF though, since unity is kinda a game engine and uses a ton of system resources just to draw a few rectangles, WPF does absolutely nothing until you interact with the app, saves you some CPU
Or even windows forms worst case
so you suggest me to use WPF?
But if you;'re making a game then well you kinda have to use unity lel
If all you're doing is making a simple app with no kind of 3D then i would recommend to
Well WPF can do 3D but it's not like you import .obj and a camera
I want to do games
Like this game I am doing
Is simple
Clicking
Simulator
Then you definitely wanna learn the unity UI stuff
Look up tutorials for making a sidebar that can be opened/closed
I've never done this deep stuff in unity so can't help rip
Yeah you are right
Thank you
For fixing
Np
The problem I had