-
- BrandonReinhart
- Posts: 29
- Joined:
Unity: Tab / Spacebar Interaction
Is it possible in some simple way to disable the ability to focus on buttons, etc? I.e. tab will select all sorts of controls and space will trigger buttons. If I write an explicit text entry control than, sure, I want to focus and capture input, but by default almost no controls should do this in a game. It's the source of quite a number of bugs.
-
- BrandonReinhart
- Posts: 29
- Joined:
Re: Unity: Tab / Spacebar Interaction
Ah, okay. I think I have this figured out.
etc
Code: Select all
<Style TargetType="{x:Type RadioButton}">
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsTabStop" Value="False" />
</Style>
<Style x:Key="SpeedRadioButtonStyle" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource {x:Type RadioButton}}">
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Unity: Tab / Spacebar Interaction
Yes, any Control by default has its Focusable property set to True, but you can change it as you indicated.
If you want ot stop any interaction with a control you can disable it by setting the IsEnabled property to False.
If you want ot stop any interaction with a control you can disable it by setting the IsEnabled property to False.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests