private void LaunchOnDisconnected(object sender, Exception exception) { _launch.Disconnected -= LaunchOnDisconnected; _launch = null; OverlayText.SetText("Launch Disconnected", TimeSpan.FromSeconds(1)); }
private void LaunchConnectOnDeviceFound(object sender, Launch device) { _launch = device; _launch.Disconnected += LaunchOnDisconnected; OverlayText.SetText("Launch Connected", TimeSpan.FromSeconds(1)); }
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); }
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); }
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)); } }
public async Task SetText(OverlayText text) { await this.SendPacket(new OverlayPacket("text", JObject.FromObject(text))); }
private void btnPause_Click(object sender, RoutedEventArgs e) { VideoPlayer.Pause(); OverlayText.SetText("Pause", TimeSpan.FromSeconds(1)); }
private void OnVolumeChanged() { OverlayText.SetText($"Volume: {Volume:f0}%", TimeSpan.FromSeconds(2)); }