Commit 1f34bea3 authored by Markus Schlösser's avatar Markus Schlösser

Fixed keyboard navigation in main menu

parent b53319f4
......@@ -171,7 +171,7 @@ GameObject:
m_Component:
- component: {fileID: 4994692637312868614}
m_Layer: 5
m_Name: Padding
m_Name: Game Select
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -346,7 +346,7 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9082363233416221668}
m_MethodName: OnPointerEnter
m_MethodName: Select
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
......@@ -361,7 +361,37 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9082363233416221668}
m_MethodName: OnPointerExit
m_MethodName: Deselect
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- eventID: 9
callback:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9082363233416221668}
m_MethodName: Select
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
- eventID: 10
callback:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9082363233416221668}
m_MethodName: Deselect
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
......
......@@ -30,11 +30,11 @@ public class GameSelectButton : MonoBehaviour {
controller.LoadGame(game);
}
public void OnPointerEnter() {
public void Select() {
controller.GameName = game.DisplayName;
}
public void OnPointerExit() {
public void Deselect() {
controller.GameName = null;
}
}
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
#if UNITY_EDITOR
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment