overlay: simplify various input controls by introducing new custom ImGUI widgets (#536)
## Description of change * Add a red `x` button to replace `Clear` button in binding tabs (Buttons/Analog/Lights). * Add a gray `x` button to replace `Clear` button in options tabs next to input widgets * Add helper for truncating text and adding ellipsis (...) to deal with text overflow in tables. * Reword some UI text for clarity
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace ImGui {
|
||||
|
||||
void HelpTooltip(const char* desc);
|
||||
@@ -7,6 +9,12 @@ namespace ImGui {
|
||||
void WarnTooltip(const char* desc, const char* warn);
|
||||
void WarnMarker(const char* desc, const char* warn);
|
||||
void DummyMarker();
|
||||
|
||||
void Knob(float fraction, float size, float thickness = 2.f,
|
||||
float pos_x = -1.f, float pos_y = -1.f);
|
||||
|
||||
std::string TruncateText(const std::string& p_text, float p_truncated_width);
|
||||
bool AddButton(const std::string& tooltip);
|
||||
bool DeleteButton(const std::string& tooltip);
|
||||
bool ClearButton(const std::string& tooltip);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user