Beispiel #1
0
        public static string ConvertInputConfigurationToAReadabledText(InputConfigurationInherentData InputConfigurationInherentData,
                                                                       bool ShowPressType = true)
        {
            string returnString = String.Empty;
            /// Keys, Scroll or Mouse button names
            int inputCount = 0;

            foreach (var attributedKey in InputConfigurationInherentData.AttributedKeys)
            {
                if (inputCount > 0)
                {
                    returnString += " OR ";
                }

                returnString += GetInputControlName(InputControlLookup.Get().keyToKeyControlLookup[attributedKey]);
                inputCount   += 1;
            }

            foreach (var mouseButton in InputConfigurationInherentData.AttributedMouseButtons)
            {
                if (inputCount > 0)
                {
                    returnString += " OR ";
                }

                returnString += GetInputControlName(InputControlLookup.Get().mouseButtonControlLookup[mouseButton]);
                inputCount   += 1;
            }

            if (InputConfigurationInherentData.AttributedMouseScroll != MouseScroll.NONE)
            {
                if (inputCount > 0)
                {
                    returnString += " OR ";
                }

                returnString += GetInputControlName(InputControlLookup.Get().mouseScrollControlLookup[InputConfigurationInherentData.AttributedMouseScroll]);
                inputCount   += 1;
            }

            if (ShowPressType)
            {
                if (InputConfigurationInherentData.DownHold)
                {
                    returnString += "<b><color=\"yellow\">" + " Hold" + "</color></b>";
                }
                else if (InputConfigurationInherentData.Released)
                {
                    returnString += "<b><color=\"yellow\">" + " Released" + "</color></b>";
                }
            }


            return(returnString);
        }
Beispiel #2
0
        public SkillSlot(CoreInteractiveObject AssociatedInteractiveObject, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput SKillSlotUIPositionInput,
                         InputID AssociatedInput)
        {
            this.AssociatedInteractiveObject          = AssociatedInteractiveObject;
            this._interactiveObjectActionPlayerSystem = interactiveObjectActionPlayerSystem;
            this.AssociatedInput = AssociatedInput;
            this.SkillSlotUI     = new SkillSlotUI(ref SKillSlotUIPositionInput);
            this.CurrentPlayerActionInherentData = new ObjectVariable <InteractiveObjectActionInherentData>(this.OnCurrentPlayerActionInherentDataChanged);

            this.SkillSlotUI.SetInputText(InputControlLookup.GetInputControlRawName(InputControlLookup.FindTheFirstInputControlForInputID(this.AssociatedInput)));
        }
Beispiel #3
0
        public ProjectileDeflectionFeedbackIcon(GameObject instanciatedGameObject, InputID DisplayedInput)
        {
            InstanciatedGameObject = instanciatedGameObject;
            this.Transform         = this.InstanciatedGameObject.transform as RectTransform;
            this.mainCamera        = Camera.main;
            this.inputText         = this.Transform.GetComponentInChildren <TMPro.TextMeshProUGUI>();

            var feedbackInputControl = InputControlLookup.FindTheFirstInputControlForInputID(DisplayedInput);

            if (feedbackInputControl != null)
            {
                this.inputText.text = InputControlLookup.GetInputControlRawName(feedbackInputControl);
            }
        }
Beispiel #4
0
 public static string GetInputControlName(InputControl inputControl)
 {
     return("<b><color=\"red\">" + InputControlLookup.GetInputControlRawName(inputControl) + "</color></b>");
 }