From 2d97a08c11dd2ffee302616521cf62023b6ca3d9 Mon Sep 17 00:00:00 2001 From: Henning Waberg Date: Fri, 10 Nov 2017 14:24:38 +0100 Subject: [PATCH] Issue #47 Make UIListItemString->UIButton keyboard / controller compatible with self contained callbacks --- X2WOTCCommunityHighlander/Src/XComGame/Classes/UIButton.uc | 7 +++++++ .../Src/XComGame/Classes/UIListItemString.uc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIButton.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIButton.uc index b7b69979e..a14860e04 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIButton.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIButton.uc @@ -399,6 +399,13 @@ simulated function bool OnUnrealCommand(int cmd, int arg) case class'UIUtilities_Input'.const.FXS_KEY_ENTER: case class'UIUtilities_Input'.const.FXS_KEY_SPACEBAR: Click(); + // Start Issue #47 + // navigable button bg for UIListItemString + if (!Click()) + { + bHandled = false; + } + // End Issure #47 break; default: bHandled = false; diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIListItemString.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIListItemString.uc index 4ca7e5dad..42d585e06 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIListItemString.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIListItemString.uc @@ -520,6 +520,13 @@ simulated function bool OnUnrealCommand(int cmd, int arg) { if( ConfirmButton != none ) return ConfirmButton.OnUnrealCommand(cmd, arg); + + // Start Issue #47: navigable button bg for UIListItemString start + if (ButtonBG.OnUnrealCommand(cmd, arg)) + { + return true; + } + // End Issue #47 } return Navigator.OnUnrealCommand(cmd, arg);