update Dear ImGui to 1.92.0, part 2
TODO: - testing - testing - testing - additional testing - extra testing and of course: - testing
This commit is contained in:
parent
11ecbebcdc
commit
ee7087b7a5
36 changed files with 245 additions and 741 deletions
|
|
@ -751,7 +751,8 @@ void FurnaceGUI::drawPattern() {
|
|||
signed char l;
|
||||
int ch=decodeUTF8((const unsigned char*)j,l);
|
||||
|
||||
totalAdvanced+=ImGui::GetFont()->GetCharAdvance(ch);
|
||||
// TODO: eliminate use of GetFontBaked()?
|
||||
totalAdvanced+=ImGui::GetFontBaked()->GetCharAdvance(ch);
|
||||
if (totalAdvanced>(chNameLimit-ellipsisSize)) break;
|
||||
|
||||
for (int k=0; k<l; k++) {
|
||||
|
|
@ -1070,7 +1071,7 @@ void FurnaceGUI::drawPattern() {
|
|||
onOffColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||
}
|
||||
}
|
||||
iconPos[0].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,ICON_FA_SQUARE).x*0.5f;
|
||||
iconPos[0].x-=mainFont->CalcTextSizeA(MAIN_FONT_SIZE,FLT_MAX,0.0f,ICON_FA_SQUARE).x*0.5f;
|
||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[0],ImGui::GetColorU32(onOffColor),ICON_FA_SQUARE);
|
||||
|
||||
// 2. PITCH SLIDE/VIBRATO
|
||||
|
|
@ -1095,7 +1096,7 @@ void FurnaceGUI::drawPattern() {
|
|||
} else {
|
||||
pitchColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||
}
|
||||
iconPos[1].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,pitchIcon).x*0.5f;
|
||||
iconPos[1].x-=mainFont->CalcTextSizeA(MAIN_FONT_SIZE,FLT_MAX,0.0f,pitchIcon).x*0.5f;
|
||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[1],ImGui::GetColorU32(pitchColor),pitchIcon);
|
||||
|
||||
|
||||
|
|
@ -1115,7 +1116,7 @@ void FurnaceGUI::drawPattern() {
|
|||
} else {
|
||||
volColor=uiColors[GUI_COLOR_PATTERN_STATUS_OFF];
|
||||
}
|
||||
iconPos[2].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,volIcon).x*0.5f;
|
||||
iconPos[2].x-=mainFont->CalcTextSizeA(MAIN_FONT_SIZE,FLT_MAX,0.0f,volIcon).x*0.5f;
|
||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[2],ImGui::GetColorU32(volColor),volIcon);
|
||||
|
||||
// 4. OTHER
|
||||
|
|
@ -1196,7 +1197,7 @@ void FurnaceGUI::drawPattern() {
|
|||
hintColor=uiColors[GUI_COLOR_TEXT];
|
||||
break;
|
||||
}
|
||||
iconPos[i+3].x-=mainFont->CalcTextSizeA(mainFont->FontSize,FLT_MAX,0.0f,hints.hint[i]).x*0.5f;
|
||||
iconPos[i+3].x-=mainFont->CalcTextSizeA(MAIN_FONT_SIZE,FLT_MAX,0.0f,hints.hint[i]).x*0.5f;
|
||||
dl->AddText(mainFont,settings.mainFontSize*dpiScale,iconPos[i+3],ImGui::GetColorU32(hintColor),hints.hint[i]);
|
||||
}
|
||||
}
|
||||
|
|
@ -1757,7 +1758,7 @@ void FurnaceGUI::drawPattern() {
|
|||
for (int j=0; j<num; j++) {
|
||||
ImVec2 partPos=ImVec2(
|
||||
off.x+patChanX[i.chan]+fmod(rand(),width),
|
||||
off.y+(playheadY)+randRange(0,patFont->FontSize)
|
||||
off.y+(playheadY)+randRange(0,PAT_FONT_SIZE)
|
||||
);
|
||||
|
||||
if (partPos.x<winMin.x || partPos.y<winMin.y || partPos.x>winMax.x || partPos.y>winMax.y) continue;
|
||||
|
|
@ -1848,7 +1849,7 @@ void FurnaceGUI::drawPattern() {
|
|||
|
||||
ImVec2 partPos=ImVec2(
|
||||
off.x+patChanX[i]+(width*0.5+0.5*sin(M_PI*(float)ch->vibratoPosGiant/64.0f)*width),
|
||||
off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize)
|
||||
off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,PAT_FONT_SIZE)
|
||||
);
|
||||
|
||||
if (!(partPos.x<winMin.x || partPos.y<winMin.y || partPos.x>winMax.x || partPos.y>winMax.y)) {
|
||||
|
|
@ -1878,8 +1879,8 @@ void FurnaceGUI::drawPattern() {
|
|||
if (part.life>255) part.life=255;
|
||||
fdl->AddText(
|
||||
iconFont,
|
||||
iconFont->FontSize,
|
||||
ImVec2(part.pos.x-iconFont->FontSize*0.5,part.pos.y-iconFont->FontSize*0.5),
|
||||
ICON_FONT_SIZE,
|
||||
ImVec2(part.pos.x-ICON_FONT_SIZE*0.5,part.pos.y-ICON_FONT_SIZE*0.5),
|
||||
part.colors[(int)part.life],
|
||||
part.type
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue