GUI: implement auto macro size setting

This commit is contained in:
tildearrow 2024-07-25 13:18:22 -05:00
parent 69962b8e7b
commit 3ac17d3a11
32 changed files with 23901 additions and 23684 deletions

View file

@ -137,7 +137,7 @@ for other operating systems, you may [build the source](#developer-info).
---
# quick references
- **discussion**: see the [Discussions](https://github.com/tildearrow/furnace/discussions) section, the [official Revolt](https://rvlt.gg/GRPS6tmc) or the [official Discord server](https://discord.gg/EfrwT2wq7z).
- **discussion**: see the [Discussions](https://github.com/tildearrow/furnace/discussions) section.
- **help**: check out the [documentation](doc/README.md).
## packages

2397
po/de.po

File diff suppressed because it is too large Load diff

2342
po/es.po

File diff suppressed because it is too large Load diff

2397
po/fi.po

File diff suppressed because it is too large Load diff

2397
po/fr.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2397
po/hy.po

File diff suppressed because it is too large Load diff

2337
po/id.po

File diff suppressed because it is too large Load diff

2397
po/ja.po

File diff suppressed because it is too large Load diff

2397
po/ko.po

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

2397
po/nl.po

File diff suppressed because it is too large Load diff

2337
po/pl.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

2337
po/ru.po

File diff suppressed because it is too large Load diff

2397
po/sk.po

File diff suppressed because it is too large Load diff

2340
po/sv.po

File diff suppressed because it is too large Load diff

2397
po/th.po

File diff suppressed because it is too large Load diff

2397
po/tr.po

File diff suppressed because it is too large Load diff

2397
po/uk.po

File diff suppressed because it is too large Load diff

2345
po/zh.po

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -16,8 +16,6 @@ if you find issues (e.g. bugs or annoyances), report them. links below.
- Furnace on GitHub (project page and issue tracker): https://github.com/tildearrow/furnace
- issues: https://github.com/tildearrow/furnace/issues
- discussion: https://github.com/tildearrow/furnace/discussions
- Furnace on Discord: https://discord.gg/EfrwT2wq7z
- Furnace on Revolt: https://rvlt.gg/GRPS6tmc
- online manual: https://tildearrow.org/furnace/doc/v0.6.5/
# notes

View file

@ -26,8 +26,6 @@ if you find issues (e.g. bugs or annoyances), report them. links below.
- Furnace on GitHub (project page and issue tracker): https://github.com/tildearrow/furnace
- issues: https://github.com/tildearrow/furnace/issues
- discussion: https://github.com/tildearrow/furnace/discussions
- Furnace on Discord: https://discord.gg/EfrwT2wq7z
- Furnace on Revolt: https://rvlt.gg/GRPS6tmc
- online manual: https://tildearrow.org/furnace/doc/v0.6.5/
# notes

View file

@ -16,8 +16,6 @@ if you find issues (e.g. bugs or annoyances), report them. links below.
- Furnace on GitHub (project page and issue tracker): https://github.com/tildearrow/furnace
- issues: https://github.com/tildearrow/furnace/issues
- discussion: https://github.com/tildearrow/furnace/discussions
- Furnace on Discord: https://discord.gg/EfrwT2wq7z
- Furnace on Revolt: https://rvlt.gg/GRPS6tmc
- online manual: https://tildearrow.org/furnace/doc/v0.6.5/
# notes

View file

@ -1780,7 +1780,7 @@ void FurnaceGUI::drawMacroEdit(FurnaceGUIMacroDesc& i, int totalFit, float avail
if ((i.macro->vScroll+i.macro->vZoom)>(i.max-i.min)) {
i.macro->vScroll=(i.max-i.min)-i.macro->vZoom;
}
} else {
} else if (!settings.autoMacroStepSize) {
macroPointSize+=wheelY;
if (macroPointSize<1) macroPointSize=1;
if (macroPointSize>256) macroPointSize=256;
@ -2163,17 +2163,23 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUI
ImGui::TableNextColumn();
float lenAvail=ImGui::GetContentRegionAvail().x;
//ImGui::Dummy(ImVec2(120.0f*dpiScale,dpiScale));
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("##MacroPointSize",&macroPointSize,1,4)) {
if (macroPointSize<1) macroPointSize=1;
if (macroPointSize>256) macroPointSize=256;
if (!settings.autoMacroStepSize) {
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("##MacroPointSize",&macroPointSize,1,4)) {
if (macroPointSize<1) macroPointSize=1;
if (macroPointSize>256) macroPointSize=256;
}
}
ImGui::TableNextColumn();
float availableWidth=ImGui::GetContentRegionAvail().x-reservedSpace;
int totalFit=MIN(255,availableWidth/MAX(1,macroPointSize*dpiScale));
int scrollMax=0;
if (settings.autoMacroStepSize) totalFit=1;
for (FurnaceGUIMacroDesc& i: macros) {
if (i.macro->len>scrollMax) scrollMax=i.macro->len;
if (settings.autoMacroStepSize) {
if ((i.macro->open&6)==0 && totalFit<i.macro->len) totalFit=i.macro->len;
}
}
scrollMax-=totalFit;
if (scrollMax<0) scrollMax=0;
@ -2353,6 +2359,7 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUI
for (FurnaceGUIMacroDesc& i: macros) {
if (i.macro->len>scrollMax) scrollMax=i.macro->len;
}
if (settings.autoMacroStepSize) totalFit=MAX(1,m.macro->len);
scrollMax-=totalFit;
if (scrollMax<0) scrollMax=0;
if (macroDragScroll>scrollMax) {
@ -2366,15 +2373,17 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUI
}
ImGui::EndDisabled();
ImGui::SameLine();
ImGui::Button(ICON_FA_SEARCH_PLUS "##MacroZoomB");
if (ImGui::BeginPopupContextItem("MacroZoomP",ImGuiPopupFlags_MouseButtonLeft)) {
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("##MacroPointSize",&macroPointSize,1,4)) {
if (macroPointSize<1) macroPointSize=1;
if (macroPointSize>256) macroPointSize=256;
if (!settings.autoMacroStepSize) {
ImGui::SameLine();
ImGui::Button(ICON_FA_SEARCH_PLUS "##MacroZoomB");
if (ImGui::BeginPopupContextItem("MacroZoomP",ImGuiPopupFlags_MouseButtonLeft)) {
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("##MacroPointSize",&macroPointSize,1,4)) {
if (macroPointSize<1) macroPointSize=1;
if (macroPointSize>256) macroPointSize=256;
}
ImGui::EndPopup();
}
ImGui::EndPopup();
}
m.height=ImGui::GetContentRegionAvail().y-ImGui::GetFontSize()-ImGui::GetFrameHeightWithSpacing()-(m.bit30?28.0f:12.0f)*dpiScale-ImGui::GetStyle().ItemSpacing.y*3.0f;

View file

@ -679,7 +679,7 @@ void FurnaceGUI::drawTutorial() {
ImGui::TextWrapped(_(
"if you need help, you may:\n"
"- read the manual (a file called manual.pdf)\n"
"- ask for help in Discussions (https://github.com/tildearrow/furnace/discussions), the Furnace Discord (https://discord.gg/EfrwT2wq7z) or Furnace in Revolt (official: https://rvlt.gg/GRPS6tmc)"
"- ask for help in Discussions (https://github.com/tildearrow/furnace/discussions)"
));
ImGui::Separator();