Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - densm27

Pages: [1]
1
Cool, thanks!

2
DotNet / Focused/Unfocused events not working properly in 0.8.7
« on: 31 July 2020, 12:00:08 »
Hello texus & everyone.

I found what seems to be a regression in tgui.net in 0.8.7+ versions.
So, I take the example code from https://tgui.net/example-code/, and add focused/unfocused event handlers to the widgets:
Code: [Select]
editBoxUsername.Focused+= (sender, eventArgs) => Console.WriteLine("uname focused");
editBoxUsername.Unfocused+= (sender, eventArgs) => Console.WriteLine("uname unfocused");
editBoxPassword.Focused+= (sender, eventArgs) => Console.WriteLine("pass focused");
editBoxPassword.Unfocused+= (sender, eventArgs) => Console.WriteLine("pass unfocused");

After launching the app and clicking any of the widgets once, i get both focused and unfocused messages for the same widget immediately. Second click at the same element, or click outside of it does not trigger any events. Click on the other widget works the same as the first one, triggering both events for it simultaneously.

Downgrading to 0.8.6 nuget package fixes the issue, but unfortunately is not an option because of the checkbox/radiobutton creation bug present in that version.

Pages: [1]