diff --git a/out/bins/ext_booter.bin b/out/bins/ext_booter.bin index 7133f57c..1ae54128 100644 Binary files a/out/bins/ext_booter.bin and b/out/bins/ext_booter.bin differ diff --git a/out/boot.dol b/out/boot.dol index 858aa399..6aa025ca 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/defines.h b/source/defines.h index fcd8fa6c..49b3e214 100644 --- a/source/defines.h +++ b/source/defines.h @@ -1,6 +1,6 @@ #define APP_NAME "WiiFlow WFL" -#define APP_VERSION "5.4.7 beta 4" +#define APP_VERSION "5.4.7 beta 5" #define APP_DATA_DIR "wiiflow" #define APPS_DIR "apps/wiiflow" diff --git a/source/gui/gui.cpp b/source/gui/gui.cpp index e2967c99..bb683c71 100644 --- a/source/gui/gui.cpp +++ b/source/gui/gui.cpp @@ -62,6 +62,24 @@ s16 CButtonsMgr::addButton(SFont font, const wstringEx &text, int x, int y, u32 return m_elts.size() > sz ? m_elts.size() - 1 : -2; } +s16 CButtonsMgr::addPicButton(TexData &texNormal, TexData &texSelected, int x, int y, u32 width, u32 height, GuiSound *clickSound, GuiSound *hoverSound) +{ + SButtonTextureSet texSet; + + texSet.center = texNormal; + texSet.centerSel = texSelected; + return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound); +} + +s16 CButtonsMgr::addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height, GuiSound *clickSound, GuiSound *hoverSound) +{ + SButtonTextureSet texSet; + + TexHandle.fromPNG(texSet.center, pngNormal); + TexHandle.fromPNG(texSet.centerSel, pngSelected); + return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound); +} + s16 CButtonsMgr::addLabel(SFont font, const wstringEx &text, int x, int y, u32 width, u32 height, const CColor &color, s16 style, const TexData &bg) { SLabel *b = new SLabel; @@ -119,24 +137,6 @@ s16 CButtonsMgr::addProgressBar(int x, int y, u32 width, u32 height, SButtonText return m_elts.size() > sz ? m_elts.size() - 1 : -2; } -s16 CButtonsMgr::addPicButton(TexData &texNormal, TexData &texSelected, int x, int y, u32 width, u32 height, GuiSound *clickSound, GuiSound *hoverSound) -{ - SButtonTextureSet texSet; - - texSet.center = texNormal; - texSet.centerSel = texSelected; - return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound); -} - -s16 CButtonsMgr::addPicButton(const u8 *pngNormal, const u8 *pngSelected, int x, int y, u32 width, u32 height, GuiSound *clickSound, GuiSound *hoverSound) -{ - SButtonTextureSet texSet; - - TexHandle.fromPNG(texSet.center, pngNormal); - TexHandle.fromPNG(texSet.centerSel, pngSelected); - return addButton(SFont(), wstringEx(), x, y, width, height, CColor(), texSet, clickSound, hoverSound); -} - void CButtonsMgr::setText(s16 id, const wstringEx &text, bool unwrap)// unwrap means no wrap { if (id == -1) return; @@ -530,12 +530,12 @@ void CButtonsMgr::mouse(int chan, int x, int y) if (m_elts.empty()) return; float w, h; - u16 start = -1; + s32 start = -1; if(m_selected[chan] != -1 && m_selected[chan] < (s32)m_elts.size()) { m_elts[m_selected[chan]]->targetScaleX = 1.f; m_elts[m_selected[chan]]->targetScaleY = 1.f; - start = (u16)m_selected[chan]; + start = m_selected[chan]; } m_selected[chan] = -1; for(int i = (int)m_elts.size() - 1; i >= 0; --i) @@ -790,12 +790,8 @@ void CButtonsMgr::_drawBtn(CButtonsMgr::SButton &b, bool selected, bool click) } if (!b.font.font) return; b.font.font->reset(); - //CColor txtColor(b.textColor.r, b.textColor.g, b.textColor.b, (u8)((int)b.textColor.a * (int)alpha / 0xFF)); - //if(m_vid.wide()) - // scaleX *= 0.8f; b.font.font->setXScale(scaleX); b.font.font->setYScale(scaleY); - //b.font.font->drawText(0, 0, b.text.c_str(), txtColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE); b.text.setColor(CColor(b.textColor.r, b.textColor.g, b.textColor.b, (u8)((int)b.textColor.a * (int)alpha / 0xFF))); b.text.setFrame(b.w, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, true, true); b.text.draw(); @@ -839,9 +835,6 @@ void CButtonsMgr::_drawLbl(CButtonsMgr::SLabel &b) if (!b.font.font) return; b.font.font->reset(); - b.text.setColor(CColor(b.textColor.r, b.textColor.g, b.textColor.b, (u8)((int)b.textColor.a * (int)alpha / 0xFF))); - //if(m_vid.wide()) - // scaleX *= 0.8f; b.font.font->setXScale(scaleX); b.font.font->setYScale(scaleY); float posX = b.pos.x; @@ -864,8 +857,9 @@ void CButtonsMgr::_drawLbl(CButtonsMgr::SLabel &b) guMtxTransApply(modelViewMtx, modelViewMtx, posX, posY, 0.f); GX_LoadPosMtxImm(modelViewMtx, GX_PNMTX0); if (b.moveByX != 0 || b.moveByY != 0) - GX_SetScissor(b.targetPos.x - b.moveByX - b.w/2, b.targetPos.y - b.moveByY - b.h/2, b.w, b.h); + GX_SetScissor(b.targetPos.x - b.moveByX - b.w/2, b.targetPos.y - b.moveByY - b.h/2, b.w, b.h); + b.text.setColor(CColor(b.textColor.r, b.textColor.g, b.textColor.b, (u8)((int)b.textColor.a * (int)alpha / 0xFF))); b.text.draw(); if (b.moveByX != 0 || b.moveByY != 0) GX_SetScissor(0, 0, m_vid.width(), m_vid.height()); diff --git a/source/menu/menu_sm_editor.cpp b/source/menu/menu_sm_editor.cpp index 11be950c..4135cea9 100644 --- a/source/menu/menu_sm_editor.cpp +++ b/source/menu/menu_sm_editor.cpp @@ -246,6 +246,7 @@ void CMenu::_checkboxesMenu(u8 md) else if(mode == 4) { bool found = false; + u8 pluginsCount = 0; string newMagics; string pluginMagic = sfmt("%08x", m_plugin.GetPluginMagic(firstCheckbox + i - 1)); string button = sfmt("button_%i", curSource); @@ -261,10 +262,11 @@ void CMenu::_checkboxesMenu(u8 md) } else { - if(j == 0) - newMagics = magicNums[0]; + if(pluginsCount == 0) + newMagics = magicNums[j]; else newMagics.append(',' + magicNums[j]); + pluginsCount++; } } }