コード例 #1
0
        private void LaunchOnDisconnected(object sender, Exception exception)
        {
            _launch.Disconnected -= LaunchOnDisconnected;
            _launch = null;

            OverlayText.SetText("Launch Disconnected", TimeSpan.FromSeconds(1));
        }
コード例 #2
0
        private void LaunchConnectOnDeviceFound(object sender, Launch device)
        {
            _launch = device;
            _launch.Disconnected += LaunchOnDisconnected;

            OverlayText.SetText("Launch Connected", TimeSpan.FromSeconds(1));
        }
コード例 #3
0
 async void Do_Clicked(object sender, EventArgs e)
 {
     OverlayText.IsVisible = true;
     OverlayText.Scale     = 2;
     OverlayText.FadeTo(1, 200);
     ContentText.Opacity         = 0.6;
     StampedCard.BackgroundColor = Color.FromHex("F32196");
     OverlayText.ScaleTo(1, 300, Easing.BounceOut);
 }
コード例 #4
0
    public OverlayText CreateOverlayText(Vector3 position, Color color, string text)
    {
        GameObject  txtOverlay = GameObject.Instantiate(OverlayText, transform) as GameObject;
        OverlayText uiText     = txtOverlay.GetComponent <OverlayText>();

        uiText.Position = position;
        uiText.color    = color;
        uiText.GetComponent <Text>().text = text;
        return(uiText);
    }
コード例 #5
0
        private async void btnConnectButtplug_OnClick(object sender, RoutedEventArgs e)
        {
            _connector = new ButtplugWebSocketConnector();
            bool success = await _connector.Connect();

            if (success)
            {
                OverlayText.SetText("Connected to B******g", TimeSpan.FromSeconds(1));
            }
            else
            {
                OverlayText.SetText("Could not connect to B******g", TimeSpan.FromSeconds(2));
            }
        }
コード例 #6
0
 public async Task SetText(OverlayText text)
 {
     await this.SendPacket(new OverlayPacket("text", JObject.FromObject(text)));
 }
コード例 #7
0
 private void btnPause_Click(object sender, RoutedEventArgs e)
 {
     VideoPlayer.Pause();
     OverlayText.SetText("Pause", TimeSpan.FromSeconds(1));
 }
コード例 #8
0
 private void OnVolumeChanged()
 {
     OverlayText.SetText($"Volume: {Volume:f0}%", TimeSpan.FromSeconds(2));
 }