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
|
|
@ -558,7 +558,7 @@ const char* FurnaceGUI::getSystemName(DivSystem which) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::updateScroll(int amount) {
|
||||
float lineHeight=(patFont->FontSize+2*dpiScale);
|
||||
float lineHeight=(PAT_FONT_SIZE+2*dpiScale);
|
||||
nextScroll=lineHeight*amount;
|
||||
haveHitBounds=false;
|
||||
}
|
||||
|
|
@ -569,13 +569,13 @@ void FurnaceGUI::updateScrollRaw(float amount) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::addScroll(int amount) {
|
||||
float lineHeight=(patFont->FontSize+2*dpiScale);
|
||||
float lineHeight=(PAT_FONT_SIZE+2*dpiScale);
|
||||
nextAddScroll=lineHeight*amount;
|
||||
haveHitBounds=false;
|
||||
}
|
||||
|
||||
void FurnaceGUI::addScrollX(int amount) {
|
||||
float lineHeight=(patFont->FontSize+2*dpiScale);
|
||||
float lineHeight=(PAT_FONT_SIZE+2*dpiScale);
|
||||
nextAddScrollX=lineHeight*amount;
|
||||
haveHitBounds=false;
|
||||
}
|
||||
|
|
@ -4304,24 +4304,6 @@ bool FurnaceGUI::loop() {
|
|||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error while building font atlas!");
|
||||
showError(_("error while loading fonts! please check your settings."));
|
||||
ImGui::GetIO().Fonts->Clear();
|
||||
mainFont=ImGui::GetIO().Fonts->AddFontDefault();
|
||||
patFont=mainFont;
|
||||
bigFont=mainFont;
|
||||
headFont=mainFont;
|
||||
if (rend) {
|
||||
rend->destroyFontsTexture();
|
||||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error again while building font atlas!");
|
||||
}
|
||||
}
|
||||
|
||||
firstFrame=true;
|
||||
mustClear=2;
|
||||
|
|
@ -4393,9 +4375,7 @@ bool FurnaceGUI::loop() {
|
|||
if (pendingLayoutImport==NULL) pendingLayoutImportStep=0;
|
||||
}
|
||||
|
||||
if (!rend->newFrame()) {
|
||||
fontsFailed=true;
|
||||
}
|
||||
rend->newFrame();
|
||||
ImGui_ImplSDL2_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
|
|
@ -7433,35 +7413,6 @@ bool FurnaceGUI::loop() {
|
|||
ImGui::GetIO().Fonts->Clear();
|
||||
|
||||
applyUISettings();
|
||||
|
||||
if (rend) {
|
||||
rend->destroyFontsTexture();
|
||||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error while building font atlas!");
|
||||
showError(_("error while loading fonts! please check your settings."));
|
||||
ImGui::GetIO().Fonts->Clear();
|
||||
mainFont=ImGui::GetIO().Fonts->AddFontDefault();
|
||||
patFont=mainFont;
|
||||
bigFont=mainFont;
|
||||
headFont=mainFont;
|
||||
if (rend) {
|
||||
rend->destroyFontsTexture();
|
||||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error again while building font atlas!");
|
||||
} else {
|
||||
rend->createFontsTexture();
|
||||
}
|
||||
} else {
|
||||
rend->createFontsTexture();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7475,17 +7426,6 @@ bool FurnaceGUI::loop() {
|
|||
patFont=mainFont;
|
||||
bigFont=mainFont;
|
||||
headFont=mainFont;
|
||||
if (rend) {
|
||||
rend->destroyFontsTexture();
|
||||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error again while building font atlas!");
|
||||
} else {
|
||||
rend->createFontsTexture();
|
||||
}
|
||||
}
|
||||
|
||||
if (!editOptsVisible) {
|
||||
|
|
@ -7898,21 +7838,6 @@ bool FurnaceGUI::init() {
|
|||
if (rend->areTexturesSquare()) {
|
||||
ImGui::GetIO().Fonts->Flags|=ImFontAtlasFlags_Square;
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error while building font atlas!");
|
||||
showError(_("error while loading fonts! please check your settings."));
|
||||
ImGui::GetIO().Fonts->Clear();
|
||||
mainFont=ImGui::GetIO().Fonts->AddFontDefault();
|
||||
patFont=mainFont;
|
||||
bigFont=mainFont;
|
||||
headFont=mainFont;
|
||||
if (rend) {
|
||||
rend->destroyFontsTexture();
|
||||
}
|
||||
if (!ImGui::GetIO().Fonts->Build()) {
|
||||
logE("error again while building font atlas!");
|
||||
}
|
||||
}
|
||||
|
||||
logD("preparing layout...");
|
||||
strncpy(finalLayoutPath,(e->getConfigPath()+String(LAYOUT_INI)).c_str(),4095);
|
||||
|
|
@ -8600,7 +8525,6 @@ FurnaceGUI::FurnaceGUI():
|
|||
patFont(NULL),
|
||||
bigFont(NULL),
|
||||
headFont(NULL),
|
||||
fontRange(NULL),
|
||||
songLength(0),
|
||||
songLoopedSectionLength(0),
|
||||
songFadeoutSectionLength(0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue