vertical text
todo: mixer tooltips
This commit is contained in:
parent
22f0b3f4e6
commit
fe0f4d82e6
4 changed files with 51 additions and 7 deletions
|
|
@ -439,6 +439,22 @@ bool FurnaceGUI::isCtrlWheelModifierHeld() const {
|
|||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::VerticalText(const char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
ImVec2 pos=ImGui::GetCursorScreenPos();
|
||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
int vtxBegin, vtxEnd;
|
||||
vtxBegin=dl->_VtxCurrentIdx;
|
||||
char text[4096];
|
||||
vsnprintf(text, 4096, fmt, args);
|
||||
ImVec2 size=ImGui::CalcTextSize(text);
|
||||
dl->AddText(pos, ImGui::GetColorU32(ImGuiCol_Text), text);
|
||||
vtxEnd=dl->_VtxCurrentIdx;
|
||||
ImGui::ShadeVertsTransformPos(dl, vtxBegin, vtxEnd, pos+ImVec2(size.x,0), 0, -1, pos);
|
||||
ImGui::Dummy(ImVec2(size.y,size.x));
|
||||
}
|
||||
|
||||
bool FurnaceGUI::CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags) {
|
||||
flags^=ImGuiSliderFlags_AlwaysClamp;
|
||||
if (ImGui::SliderScalar(label,data_type,p_data,p_min,p_max,format,flags)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue