public override string GetGamepadText()
        {
            uint   enteredGamepadTextLength = SteamUtils.GetEnteredGamepadTextLength();
            string result = default(string);

            SteamUtils.GetEnteredGamepadTextInput(out result, enteredGamepadTextLength);
            return(result);
        }
Esempio n. 2
0
        public override string GetGamepadText()
        {
            uint   gamepadTextLength = SteamUtils.GetEnteredGamepadTextLength();
            string str;

            SteamUtils.GetEnteredGamepadTextInput(ref str, gamepadTextLength);
            return(str);
        }
Esempio n. 3
0
        public string GetText()
        {
            uint cchText = SteamUtils.GetEnteredGamepadTextLength();

            string pchText;

            SteamUtils.GetEnteredGamepadTextInput(out pchText, cchText);

            return(pchText);
        }
Esempio n. 4
0
 internal static void OnTextInputDismissed(GamepadTextInputDismissed_t text)
 {
     if (text.m_bSubmitted)
     {
         SteamUtils.GetEnteredGamepadTextInput(
             out keyboardAction.TextInput,
             4096                     // FIXME
             );
     }
 }
Esempio n. 5
0
    void OnGamepadTextInputDismissed(GamepadTextInputDismissed_t pCallback)
    {
        Debug.Log("[" + GamepadTextInputDismissed_t.k_iCallback + " - GamepadTextInputDismissed] - " + pCallback.m_bSubmitted + " -- " + pCallback.m_unSubmittedText);

        if (pCallback.m_bSubmitted)
        {
            uint Length = SteamUtils.GetEnteredGamepadTextLength();
            Debug.Log("SteamUtils.GetEnteredGamepadTextLength() - " + Length);

            string Text;
            bool   ret = SteamUtils.GetEnteredGamepadTextInput(out Text, 32);
            Debug.Log("SteamUtils.GetEnteredGamepadTextInput(out Text, 32) - " + ret + " -- " + Text);
        }
    }
Esempio n. 6
0
        public void OnKeyboardDismissed(GamepadTextInputDismissed_t callback)
        {
            if (_keyboardTextBox == null)
            {
                return;
            }
            if (!callback.m_bSubmitted)
            {
                _keyboardTextBox = null;
                return;
            }
            string entered_text = "";
            uint   length       = SteamUtils.GetEnteredGamepadTextLength();

            if (!SteamUtils.GetEnteredGamepadTextInput(out entered_text, length))
            {
                _keyboardTextBox = null;
                return;
            }
            _keyboardTextBox.RecieveTextInput(entered_text);
            _keyboardTextBox = null;
        }
Esempio n. 7
0
    public void RenderOnGUI()
    {
        GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height));
        GUILayout.Label("Variables:");
        GUILayout.Label("m_Image:");
        GUILayout.Label(m_Image);
        GUILayout.EndArea();

        GUILayout.Label("SteamUtils.GetSecondsSinceAppActive() : " + SteamUtils.GetSecondsSinceAppActive());
        GUILayout.Label("SteamUtils.GetConnectedUniverse() : " + SteamUtils.GetConnectedUniverse());
        GUILayout.Label("SteamUtils.GetServerRealTime() : " + SteamUtils.GetServerRealTime());
        GUILayout.Label("SteamUtils.GetIPCountry() : " + SteamUtils.GetIPCountry());

        {
            uint ImageWidth  = 0;
            uint ImageHeight = 0;
            bool ret         = SteamUtils.GetImageSize(1, out ImageWidth, out ImageHeight);
            GUILayout.Label("SteamUtils.GetImageSize(1, out ImageWidth, out ImageHeight) : " + ret + " -- " + ImageWidth + " -- " + ImageHeight);

            if (GUILayout.Button("SteamUtils.GetImageRGBA(1, Image, (int)(ImageWidth * ImageHeight * 4)"))
            {
                if (ImageWidth > 0 && ImageHeight > 0)
                {
                    byte[] Image = new byte[ImageWidth * ImageHeight * 4];
                    ret = SteamUtils.GetImageRGBA(1, Image, (int)(ImageWidth * ImageHeight * 4));
                    print("SteamUtils.GetImageRGBA(1, " + Image + ", " + (int)(ImageWidth * ImageHeight * 4) + ") - " + ret + " -- " + ImageWidth + " -- " + ImageHeight);
                    if (ret)
                    {
                        m_Image = new Texture2D((int)ImageWidth, (int)ImageHeight, TextureFormat.RGBA32, false, true);
                        m_Image.LoadRawTextureData(Image);
                        m_Image.Apply();
                    }
                }
            }
        }

        {
            uint   IP;
            ushort Port;
            bool   ret = SteamUtils.GetCSERIPPort(out IP, out Port);
            GUILayout.Label("SteamUtils.GetCSERIPPort(out IP, out Port) : " + ret + " -- " + IP + " -- " + Port);
        }

        GUILayout.Label("SteamUtils.GetCurrentBatteryPower() : " + SteamUtils.GetCurrentBatteryPower());
        GUILayout.Label("SteamUtils.GetAppID() : " + SteamUtils.GetAppID());

        if (GUILayout.Button("SteamUtils.SetOverlayNotificationPosition(k_EPositionTopRight)"))
        {
            SteamUtils.SetOverlayNotificationPosition(ENotificationPosition.k_EPositionTopRight);
            print("SteamUtils.SetOverlayNotificationPosition(k_EPositionTopRight)");
        }

        //GUILayout.Label("SteamUtils.IsAPICallCompleted() : " + SteamUtils.IsAPICallCompleted()); // N/A - These 3 functions are used to dispatch CallResults.
        //GUILayout.Label("SteamUtils.GetAPICallFailureReason() : " + SteamUtils.GetAPICallFailureReason()); // N/A
        //GUILayout.Label("SteamUtils.GetAPICallResult() : " + SteamUtils.GetAPICallResult()); // N/A

        if (GUILayout.Button("SteamUtils.RunFrame()"))
        {
            SteamUtils.RunFrame();
            print("SteamUtils.RunFrame()");
        }

        GUILayout.Label("SteamUtils.GetIPCCallCount() : " + SteamUtils.GetIPCCallCount());

        //GUILayout.Label("SteamUtils.SetWarningMessageHook() : " + SteamUtils.SetWarningMessageHook()); // N/A - Check out SteamTest.cs for example usage.

        GUILayout.Label("SteamUtils.IsOverlayEnabled() : " + SteamUtils.IsOverlayEnabled());
        GUILayout.Label("SteamUtils.BOverlayNeedsPresent() : " + SteamUtils.BOverlayNeedsPresent());

        if (GUILayout.Button("SteamUtils.CheckFileSignature(\"FileNotFound.txt\")"))
        {
            SteamAPICall_t handle = SteamUtils.CheckFileSignature("FileNotFound.txt");
            OnCheckFileSignatureCallResult.Set(handle);
            print("SteamUtils.CheckFileSignature(\"FileNotFound.txt\") - " + handle);
        }

        if (GUILayout.Button("SteamUtils.ShowGamepadTextInput(k_EGamepadTextInputModeNormal, k_EGamepadTextInputLineModeSingleLine, \"Description Test!\", 32)"))
        {
            bool ret = SteamUtils.ShowGamepadTextInput(EGamepadTextInputMode.k_EGamepadTextInputModeNormal, EGamepadTextInputLineMode.k_EGamepadTextInputLineModeSingleLine, "Description Test!", 32, "");
            print("SteamUtils.ShowGamepadTextInput(k_EGamepadTextInputModeNormal, k_EGamepadTextInputLineModeSingleLine, \"Description Test!\", 32) - " + ret);
        }

        GUILayout.Label("SteamUtils.GetEnteredGamepadTextLength() : " + SteamUtils.GetEnteredGamepadTextLength());         // TODO - only to be called from within OnGamepadTextInputDismissed?

        {
            string Text;
            bool   ret = SteamUtils.GetEnteredGamepadTextInput(out Text, 32);
            GUILayout.Label("SteamUtils.GetEnteredGamepadTextInput(out Text, 32) - " + ret + " -- " + Text);
        }

        GUILayout.Label("SteamUtils.GetSteamUILanguage() : " + SteamUtils.GetSteamUILanguage());
    }