1
0
vibe-plugin/FFXIV_Vibe_Plugin/App/UI/UIBanner.cs

30 lines
1.0 KiB
C#
Raw Permalink Normal View History

2023-01-24 21:50:56 +00:00
using System;
using System.Linq;
using System.Numerics;
using ImGuiNET;
using Dalamud.Interface.Colors;
using FFXIV_Vibe_Plugin.Commons;
using FFXIV_Vibe_Plugin.Device;
namespace FFXIV_Vibe_Plugin.UI {
internal class UIBanner {
2023-02-22 22:00:47 +00:00
public static void Draw(int frameCounter, Logger logger, ImGuiScene.TextureWrap image, DevicesController devicesController) {
2023-01-24 21:50:56 +00:00
ImGui.Columns(2, "###main_header", false);
float logoScale = 0.2f;
ImGui.SetColumnWidth(0, (int)(image.Width * logoScale + 20));
ImGui.Image(image.ImGuiHandle, new Vector2(image.Width * logoScale, image.Height * logoScale));
ImGui.NextColumn();
if(devicesController.IsConnected()) {
int nbrDevices = devicesController.GetDevices().Count;
ImGui.TextColored(ImGuiColors.ParsedGreen, "Your are connected!");
ImGui.Text($"Number of device(s): {nbrDevices}");
} else {
ImGui.TextColored(ImGuiColors.ParsedGrey, "Your are not connected!");
}
}
}
}