mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 12:35:11 +00:00
GUI: implement auto macro size setting
This commit is contained in:
parent
69962b8e7b
commit
3ac17d3a11
32 changed files with 23901 additions and 23684 deletions
|
@ -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/furnace.pot
2397
po/furnace.pot
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.
Binary file not shown.
2397
po/pt_BR.po
2397
po/pt_BR.po
File diff suppressed because it is too large
Load diff
2341
po/zh_HK.po
2341
po/zh_HK.po
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",¯oPointSize,1,4)) {
|
||||
if (macroPointSize<1) macroPointSize=1;
|
||||
if (macroPointSize>256) macroPointSize=256;
|
||||
if (!settings.autoMacroStepSize) {
|
||||
ImGui::SetNextItemWidth(120.0f*dpiScale);
|
||||
if (ImGui::InputInt("##MacroPointSize",¯oPointSize,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",¯oPointSize,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",¯oPointSize,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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue