CogInput: Improve gamepad window

can control that stick by dragging it
This commit is contained in:
Arnaud Jamin
2023-11-03 14:04:57 -04:00
parent 29e8fa4522
commit 4e13413dab
5 changed files with 171 additions and 65 deletions
@@ -206,10 +206,16 @@ void FCogWindowWidgets::PopBackColor()
ImGui::PopStyleColor(9);
}
//--------------------------------------------------------------------------------------------------------------------------
float FCogWindowWidgets::GetShortWidth()
{
return ImGui::GetFontSize() * 10;
}
//--------------------------------------------------------------------------------------------------------------------------
void FCogWindowWidgets::SetNextItemToShortWidth()
{
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 10);
ImGui::SetNextItemWidth(GetShortWidth());
}
//--------------------------------------------------------------------------------------------------------------------------
@@ -42,6 +42,8 @@ public:
static void PopBackColor();
static float GetShortWidth();
static void SetNextItemToShortWidth();
static float GetFontWidth();