2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
#include "menu.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
const CMenu::SCFParamDesc CMenu::_cfParams[] = {
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, true, "Camera", { "Position", "Aim", "Oscillation speed", "Oscillation scale" },
|
|
|
|
{ "camera_pos", "camera_aim", "camera_osc_speed", "camera_osc_amp" },
|
|
|
|
{ 0.05f, 0.05f, 0.05f, 0.05f },
|
|
|
|
{ { -15.f, 15.f }, { -15.f, 15.f }, { -15.f, 15.f }, { -15.f, 15.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, true, "Cover Position", { "Left", "Center", "Right", "Row Center" },
|
|
|
|
{ "left_pos", "center_pos", "right_pos", "row_center_pos" },
|
|
|
|
{ 0.05f, 0.05f, 0.05f, 0.05f },
|
|
|
|
{ { -15.f, 15.f }, { -15.f, 15.f }, { -15.f, 15.f }, { -15.f, 15.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Cover Angle", { "Left", "Center", "Right", "Row Center" },
|
|
|
|
{ "left_angle", "center_angle", "right_angle", "row_center_angle" },
|
|
|
|
{ 1.f, 1.f, 1.f, 1.f },
|
|
|
|
{ { -1080.f, 1080.f }, { -1080.f, 1080.f }, { -1080.f, 1080.f }, { -1080.f, 1080.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Cover Spacer", { "Left", "Right", "Left Relative Angle", "Right Relative Angle" },
|
|
|
|
{ "left_spacer", "right_spacer", "left_delta_angle", "right_delta_angle" },
|
|
|
|
{ 0.05f, 0.05f, 1.f, 1.f },
|
|
|
|
{ { -10.f, 10.f }, { -10.f, 10.f }, { -1080.f, 1080.f }, { -1080.f, 1080.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Cover Oscillation", { "Speed", "Angle", "Speed", "Scale" },
|
|
|
|
{ "cover_osc_speed", "cover_osc_amp", "cover_pos_osc_speed", "cover_pos_osc_amp" },
|
|
|
|
{ 0.25f, 0.25f, 0.05f, 0.05f },
|
|
|
|
{ { 0.f, 50.f }, { -90.f, 90.f }, { 0.f, 50.f }, { -4.f, 4.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, true, "Title Position", { "Left", "Center", "Right", "" },
|
|
|
|
{ "text_left_pos", "text_center_pos", "text_right_pos", "" },
|
|
|
|
{ 0.05f, 0.05f, 0.05f, 0.f },
|
|
|
|
{ { -15.f, 15.f }, { -15.f, 15.f }, { -15.f, 15.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, true, "Title Angle", { "Left", "Center", "Right", "" },
|
|
|
|
{ "text_left_angle", "text_center_angle", "text_right_angle", "" },
|
|
|
|
{ 1.f, 1.f, 1.f, 0.f },
|
|
|
|
{ { -1080.f, 1080.f }, { -1080.f, 1080.f }, { -1080.f, 1080.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_TXTSTYLE, CMenu::SCFParamDesc::PDT_TXTSTYLE },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, true, "Title Width", { "Center", "Side", "Center Style", "Side Style" },
|
|
|
|
{ "text_center_wrap_width", "text_side_wrap_width", "text_center_style", "text_side_style" },
|
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
|
|
|
{ 10.f, 10.f, 1.f, 1.f },
|
2012-01-21 21:57:41 +01:00
|
|
|
{ { 50.f, 3000.f }, { 50.f, 3000.f }, { 0.f, 8.f }, { 0.f, 8.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_EMPTY, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_NORMAL, true, "Dimensions", { "Rows", "Columns", "", "" },
|
|
|
|
{ "rows", "columns", "", "" },
|
|
|
|
{ 2.f, 2.f, 0.f, 0.f },
|
|
|
|
{ { 1.f, 9.f }, { 3.f, 21.f }, { 0.f, 0.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_EMPTY, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Row Angle", { "Top", "Bottom", "", "" },
|
|
|
|
{ "top_angle", "bottom_angle", "", "" },
|
|
|
|
{ 1.f, 1.f, 0.f, 0.f },
|
|
|
|
{ { -1080.f, 1080.f }, { -1080.f, 1080.f }, { 0.f, 0.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Row Spacer", { "Top", "Bottom", "Top Relative Angle", "Bottom Relative Angle" },
|
|
|
|
{ "top_spacer", "bottom_spacer", "top_delta_angle", "bottom_delta_angle" },
|
|
|
|
{ 0.05f, 0.05f, 1.f, 1.f },
|
|
|
|
{ { -15.f, 15.f }, { -15.f, 15.f }, { -1080.f, 1080.f }, { -1080.f, 1080.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Colors", { "Inner", "Outer", "Pointer", "" },
|
|
|
|
{ "color_beg", "color_end", "color_off", "" },
|
|
|
|
{ 1.f, 1.f, 1.f, 0.f },
|
|
|
|
{ { 0.f, 255.f }, { 0.f, 255.f }, { 0.f, 255.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_BOOL, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_NORMAL, false, "Mirror Effect", { "Intensity", "Blur", "Title Intensity", "" },
|
|
|
|
{ "mirror_alpha", "mirror_blur", "title_mirror_alpha", "" },
|
|
|
|
{ 0.01f, 1.f, 0.01f, 0.f },
|
|
|
|
{ { 0.f, 1.f }, { 0.f, 1.f }, { 0.f, 1.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_NORMAL, false, "Shadow", { "Scale", "X offset", "Y offset", "" },
|
|
|
|
{ "shadow_scale", "shadow_x" , "shadow_y", "" },
|
|
|
|
{ 0.01f, 0.125f, 0.125f, 0.f },
|
|
|
|
{ { 0.5f, 1.5f }, { -5.f, 5.f }, { -5.f, 5.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_COLOR, CMenu::SCFParamDesc::PDT_COLOR },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Shadow Colors", { "Center", "Inner", "Outer", "Pointer" },
|
|
|
|
{ "color_shadow_center", "color_shadow_beg" , "color_shadow_end", "color_shadow_off" },
|
|
|
|
{ 1.f, 1.f, 1.f, 1.f },
|
|
|
|
{ { 0.f, 255.f }, { 0.f, 255.f }, { 0.f, 255.f }, { 0.f, 255.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D },
|
|
|
|
CMenu::SCFParamDesc::PDD_BOTH, false, "Cover Scale", { "Left", "Center", "Right", "Row Center" },
|
|
|
|
{ "left_scale", "center_scale" , "right_scale", "row_center_scale" },
|
|
|
|
{ 0.01f, 0.01f, 0.01f, 0.01f },
|
|
|
|
{ { 0.1f, 4.f }, { 0.1f, 4.f }, { 0.1f, 4.f }, { 0.1f, 4.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_V3D, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_SELECTED, true, "Flipped Cover", { "Position", "Angle", "Scale", "" },
|
|
|
|
{ "flip_pos", "flip_angle" , "flip_scale", "" },
|
|
|
|
{ 0.05f, 1.f, 0.01f, 0.f },
|
|
|
|
{ { -15.f, 15.f }, { -1080.f, 1080.f }, { 0.1f, 4.f }, { 0.f, 0.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_FLOAT },
|
|
|
|
CMenu::SCFParamDesc::PDD_NORMAL, false, "Tweaks", { "Max FSAA", "Blur resolution", "Blur radius", "Blur factor" },
|
|
|
|
{ "max_fsaa", "blur_resolution" , "blur_radius", "blur_factor" },
|
|
|
|
{ 1.f, 1.f, 1.f, 0.1f },
|
|
|
|
{ { 2.f, 8.f }, { 0.f, 3.f }, { 1.f, 3.f }, { 1.f, 2.f } } },
|
|
|
|
{ { CMenu::SCFParamDesc::PDT_FLOAT, CMenu::SCFParamDesc::PDT_INT, CMenu::SCFParamDesc::PDT_BOOL, CMenu::SCFParamDesc::PDT_EMPTY },
|
|
|
|
CMenu::SCFParamDesc::PDD_NORMAL, false, "Textures", { "LOD bias", "Anisotropy", "Edge LOD", "" },
|
|
|
|
{ "tex_lod_bias", "tex_aniso" , "tex_edge_lod", "" },
|
|
|
|
{ 0.1f, 1.f, 1.f, 0.f },
|
|
|
|
{ { -3.f, 0.5f }, { 0.f, 2.f }, { 0.f, 1.f }, { 0.f, 0.f } } }
|
|
|
|
};
|
|
|
|
|
2016-04-03 02:51:40 +02:00
|
|
|
template <class T> static inline T loopNum(T i, T s)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-04-03 02:51:40 +02:00
|
|
|
return (i + s) % s;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static const u16 g_txtStyles[9] = {
|
|
|
|
FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP,
|
|
|
|
FTGX_JUSTIFY_LEFT | FTGX_ALIGN_MIDDLE,
|
|
|
|
FTGX_JUSTIFY_LEFT | FTGX_ALIGN_BOTTOM,
|
|
|
|
FTGX_JUSTIFY_CENTER | FTGX_ALIGN_TOP,
|
|
|
|
FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE,
|
|
|
|
FTGX_JUSTIFY_CENTER | FTGX_ALIGN_BOTTOM,
|
|
|
|
FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_TOP,
|
|
|
|
FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE,
|
|
|
|
FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_BOTTOM
|
|
|
|
};
|
|
|
|
|
|
|
|
static int styleToIdx(u16 s)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < 9; ++i)
|
|
|
|
if (g_txtStyles[i] == s)
|
|
|
|
return i;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static string styleToTxt(u16 s)
|
|
|
|
{
|
|
|
|
string ts;
|
|
|
|
if ((s & FTGX_JUSTIFY_CENTER) != 0)
|
|
|
|
ts += 'C';
|
|
|
|
else if ((s & FTGX_JUSTIFY_RIGHT) != 0)
|
|
|
|
ts += 'R';
|
|
|
|
else
|
|
|
|
ts += 'L';
|
|
|
|
if ((s & FTGX_ALIGN_MIDDLE) != 0)
|
|
|
|
ts += 'M';
|
|
|
|
else if ((s & FTGX_ALIGN_BOTTOM) != 0)
|
|
|
|
ts += 'B';
|
|
|
|
else
|
|
|
|
ts += 'T';
|
|
|
|
return ts;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_hideCFTheme(bool instant)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnAlt, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnSelect, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnWide, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeLblParam, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnParamM, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnParamP, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnSave, instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnCancel, instant);
|
|
|
|
//
|
|
|
|
for (int i = 0; i < 16; ++i)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[i], instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[i], instant);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[i], instant);
|
|
|
|
}
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
m_btnMgr.hide(m_cfThemeLblValTxt[i], instant);
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_showCFTheme(u32 curParam, int version, bool wide)
|
|
|
|
{
|
|
|
|
const CMenu::SCFParamDesc &p = CMenu::_cfParams[curParam];
|
2012-11-11 19:28:03 +01:00
|
|
|
bool selected = CoverFlow.selected();
|
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
|
|
|
string domUnsel(fmt("%s_%i", cf_domain, version));
|
|
|
|
string domSel(fmt("%s_%i_S", cf_domain, version));
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.simulateOtherScreenFormat(p.scrnFmt && wide != m_vid.wide());
|
2012-01-21 21:57:41 +01:00
|
|
|
_setBg(m_mainBg, m_mainBgLQ);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnSave);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnCancel);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnAlt);
|
|
|
|
m_btnMgr.setText(m_cfThemeBtnAlt, wstringEx(sfmt("%i", version)));
|
|
|
|
// if (p.domain == CMenu::SCFParamDesc::PDD_BOTH)
|
|
|
|
m_btnMgr.show(m_cfThemeBtnSelect);
|
|
|
|
// else
|
|
|
|
// m_btnMgr.hide(m_cfThemeBtnSelect);
|
|
|
|
m_btnMgr.setText(m_cfThemeBtnSelect, selected ? L"X" : L"");
|
|
|
|
if (p.scrnFmt)
|
|
|
|
m_btnMgr.show(m_cfThemeBtnWide);
|
|
|
|
else
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnWide);
|
|
|
|
m_btnMgr.setText(m_cfThemeBtnWide, wide ? L"16:9" : L"4:3");
|
|
|
|
m_btnMgr.show(m_cfThemeLblParam);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnParamM);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnParamP);
|
|
|
|
m_btnMgr.setText(m_cfThemeLblParam, string(p.name));
|
|
|
|
//
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
{
|
2012-04-15 15:47:42 +02:00
|
|
|
string domain = (p.domain != CMenu::SCFParamDesc::PDD_NORMAL && selected) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED ? domSel : domUnsel;
|
2012-01-21 21:57:41 +01:00
|
|
|
int k = i * 4;
|
|
|
|
string key(p.key[i]);
|
|
|
|
if (!wide && p.scrnFmt && (p.paramType[i] == CMenu::SCFParamDesc::PDT_V3D || p.paramType[i] == CMenu::SCFParamDesc::PDT_FLOAT || p.paramType[i] == CMenu::SCFParamDesc::PDT_INT))
|
|
|
|
key += "_4_3";
|
|
|
|
if (p.paramType[i] != CMenu::SCFParamDesc::PDT_EMPTY)
|
|
|
|
{
|
|
|
|
m_btnMgr.show(m_cfThemeLblValTxt[i]);
|
|
|
|
m_btnMgr.setText(m_cfThemeLblValTxt[i], string(p.valName[i]));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
m_btnMgr.hide(m_cfThemeLblValTxt[i]);
|
|
|
|
switch (p.paramType[i])
|
|
|
|
{
|
|
|
|
case CMenu::SCFParamDesc::PDT_EMPTY:
|
|
|
|
for (int j = 0; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case CMenu::SCFParamDesc::PDT_FLOAT:
|
2016-04-30 16:19:30 +02:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k], sfmt("%.2f", m_coverflow.getFloat(domain, key)));
|
2012-01-21 21:57:41 +01:00
|
|
|
for (int j = 1; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k]);
|
|
|
|
break;
|
|
|
|
case CMenu::SCFParamDesc::PDT_V3D:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
Vector3D v(m_coverflow.getVector3D(domain, key));
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 0], sfmt("%.2f", v.x));
|
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 1], sfmt("%.2f", v.y));
|
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 2], sfmt("%.2f", v.z));
|
|
|
|
for (int j = 0; j < 3; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + 3]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + 3]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + 3]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_COLOR:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
CColor color(m_coverflow.getColor(domain, key));
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 0], sfmt("%02X", color.r));
|
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 1], sfmt("%02X", color.g));
|
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 2], sfmt("%02X", color.b));
|
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k + 3], sfmt("%02X", color.a));
|
|
|
|
for (int j = 0; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_BOOL:
|
2016-04-30 16:19:30 +02:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k], m_coverflow.getBool(domain, key) ? L"On" : L"Off");
|
2012-01-21 21:57:41 +01:00
|
|
|
for (int j = 1; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k]);
|
|
|
|
break;
|
|
|
|
case CMenu::SCFParamDesc::PDT_INT:
|
2016-04-30 16:19:30 +02:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k], sfmt("%i", m_coverflow.getInt(domain, key)));
|
2012-01-21 21:57:41 +01:00
|
|
|
for (int j = 1; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k]);
|
|
|
|
break;
|
|
|
|
case CMenu::SCFParamDesc::PDT_TXTSTYLE:
|
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
|
|
|
m_btnMgr.setText(m_cfThemeLblVal[k], styleToTxt(_textStyle(domain.c_str(), key.c_str(), CoverFlow.selected() ? FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_TOP : FTGX_JUSTIFY_CENTER | FTGX_ALIGN_BOTTOM, true)));
|
2012-01-21 21:57:41 +01:00
|
|
|
for (int j = 1; j < 4; ++j)
|
|
|
|
{
|
|
|
|
m_btnMgr.hide(m_cfThemeLblVal[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValM[k + j]);
|
|
|
|
m_btnMgr.hide(m_cfThemeBtnValP[k + j]);
|
|
|
|
}
|
|
|
|
m_btnMgr.show(m_cfThemeLblVal[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValM[k]);
|
|
|
|
m_btnMgr.show(m_cfThemeBtnValP[k]);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_cfTheme(void)
|
|
|
|
{
|
|
|
|
u32 curParam = 0;
|
|
|
|
int cfVersion = 1;
|
|
|
|
bool wide = m_vid.wide();
|
|
|
|
int copyVersion = 0;
|
|
|
|
bool copySelected = false;
|
|
|
|
bool copyWide = wide;
|
2013-10-21 16:53:46 +02:00
|
|
|
int showBtnsDelay = 0;
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
SetupInput();
|
|
|
|
_initCF();
|
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2012-09-09 20:35:15 +02:00
|
|
|
while(!m_exit)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-09-09 20:35:15 +02:00
|
|
|
_mainLoopCommon(true);
|
|
|
|
if(BTN_HOME_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.clear();
|
|
|
|
m_coverflow.unload();
|
|
|
|
m_coverflow.load(fmt("%s/coverflows/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "default").c_str()));
|
|
|
|
if(!m_coverflow.loaded())
|
|
|
|
m_coverflow.load(fmt("%s/coverflows/default.ini", m_themeDir.c_str()));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
else if(BTN_UP_PRESSED)
|
2013-10-21 16:53:46 +02:00
|
|
|
{
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.up();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
else if(BTN_DOWN_PRESSED)
|
2013-10-21 16:53:46 +02:00
|
|
|
{
|
2012-01-21 21:57:41 +01:00
|
|
|
m_btnMgr.down();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
if(BTN_B_HELD && BTN_1_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
|
|
|
copyVersion = cfVersion;
|
2012-11-11 19:28:03 +01:00
|
|
|
copySelected = CoverFlow.selected();
|
2012-01-21 21:57:41 +01:00
|
|
|
copyWide = wide;
|
|
|
|
}
|
2012-09-09 20:35:15 +02:00
|
|
|
else if(copyVersion > 0 && BTN_B_HELD && BTN_2_PRESSED)
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-11-18 14:40:26 +01:00
|
|
|
string domSrc(fmt(_cfDomain(copySelected), copyVersion));
|
|
|
|
string domDst(fmt(_cfDomain(CoverFlow.selected()), cfVersion));
|
2012-11-11 19:28:03 +01:00
|
|
|
if (copyVersion != cfVersion || copySelected != CoverFlow.selected())
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.copyDomain(domDst, domSrc);
|
2012-01-21 21:57:41 +01:00
|
|
|
else if (copyWide != wide)
|
|
|
|
for (u32 i = 0; i < ARRAY_SIZE(CMenu::_cfParams); ++i)
|
|
|
|
{
|
|
|
|
const CMenu::SCFParamDesc &p = CMenu::_cfParams[i];
|
|
|
|
if (p.scrnFmt)
|
|
|
|
for (int k = 0; k < 4; ++k)
|
|
|
|
{
|
|
|
|
string keySrc(p.key[k]);
|
|
|
|
string keyDst(p.key[k]);
|
|
|
|
if (wide)
|
|
|
|
keySrc += "_4_3";
|
|
|
|
else
|
|
|
|
keyDst += "_4_3";
|
|
|
|
if (p.paramType[k] == CMenu::SCFParamDesc::PDT_FLOAT)
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setFloat(domDst, keyDst, m_coverflow.getFloat(domSrc, keySrc));
|
2012-01-21 21:57:41 +01:00
|
|
|
else if (p.paramType[k] == CMenu::SCFParamDesc::PDT_V3D)
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setVector3D(domDst, keyDst, m_coverflow.getVector3D(domSrc, keySrc));
|
2012-01-21 21:57:41 +01:00
|
|
|
else if (p.paramType[k] == CMenu::SCFParamDesc::PDT_INT)
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setInt(domDst, keyDst, m_coverflow.getInt(domSrc, keySrc));
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
2012-11-11 19:28:03 +01:00
|
|
|
bool sel = CoverFlow.selected();
|
2012-01-21 21:57:41 +01:00
|
|
|
if (BTN_B_HELD)
|
|
|
|
{
|
|
|
|
if (BTN_PLUS_PRESSED || BTN_MINUS_PRESSED)
|
|
|
|
{
|
|
|
|
s8 direction = BTN_PLUS_PRESSED ? 1 : -1;
|
|
|
|
curParam = loopNum(curParam + direction, ARRAY_SIZE(CMenu::_cfParams));
|
|
|
|
if (CMenu::_cfParams[curParam].domain == CMenu::SCFParamDesc::PDD_SELECTED)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.select();
|
2012-01-21 21:57:41 +01:00
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (!sel)
|
|
|
|
{
|
|
|
|
if (BTN_PLUS_PRESSED)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.pageDown();
|
2012-01-21 21:57:41 +01:00
|
|
|
else if (BTN_MINUS_PRESSED)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.pageUp();
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
if (BTN_LEFT_REPEAT)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.left();
|
2012-01-21 21:57:41 +01:00
|
|
|
else if (BTN_RIGHT_REPEAT)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.right();
|
|
|
|
if (sel && !CoverFlow.selected())
|
|
|
|
CoverFlow.select();
|
2012-01-21 21:57:41 +01:00
|
|
|
if (BTN_A_PRESSED)
|
|
|
|
{
|
|
|
|
if (m_btnMgr.selected(m_cfThemeBtnSave))
|
|
|
|
{
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.stopCoverLoader();
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.save();
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
else if (m_btnMgr.selected(m_cfThemeBtnCancel))
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.clear();
|
|
|
|
m_coverflow.unload();
|
|
|
|
m_coverflow.load(fmt("%s/coverflows/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "default").c_str()));
|
|
|
|
if(!m_coverflow.loaded())
|
|
|
|
m_coverflow.load(fmt("%s/coverflows/default.ini", m_themeDir.c_str()));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
2012-05-04 15:29:08 +02:00
|
|
|
else if (m_btnMgr.selected(m_cfThemeBtnAlt))
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2016-04-03 02:51:40 +02:00
|
|
|
cfVersion = 1 + loopNum((u8)cfVersion, m_numCFVersions);
|
2012-01-21 21:57:41 +01:00
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
else if (m_btnMgr.selected(m_cfThemeBtnSelect))
|
|
|
|
{
|
2012-11-11 19:28:03 +01:00
|
|
|
if (CoverFlow.selected())
|
|
|
|
CoverFlow.cancel();
|
2012-01-21 21:57:41 +01:00
|
|
|
else
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.select();
|
2012-01-21 21:57:41 +01:00
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
else if (m_btnMgr.selected(m_cfThemeBtnWide))
|
|
|
|
{
|
|
|
|
wide = !wide;
|
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
else if (m_btnMgr.selected(m_cfThemeBtnParamP) || m_btnMgr.selected(m_cfThemeBtnParamM))
|
|
|
|
{
|
|
|
|
s8 direction = m_btnMgr.selected(m_cfThemeBtnParamP) ? 1 : -1;
|
|
|
|
curParam = loopNum(curParam + direction, ARRAY_SIZE(CMenu::_cfParams));
|
|
|
|
if (CMenu::_cfParams[curParam].domain == CMenu::SCFParamDesc::PDD_SELECTED)
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.select();
|
2012-01-21 21:57:41 +01:00
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (BTN_A_REPEAT || BTN_A_PRESSED)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < 16; ++i)
|
|
|
|
if (m_btnMgr.selected(m_cfThemeBtnValM[i]) || m_btnMgr.selected(m_cfThemeBtnValP[i]))
|
|
|
|
{
|
|
|
|
_cfParam(m_btnMgr.selected(m_cfThemeBtnValP[i]), i, CMenu::_cfParams[curParam], cfVersion, wide);
|
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
|
|
|
_loadCFLayout(cfVersion, true, wide != m_vid.wide());
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.applySettings();
|
2013-10-21 16:53:46 +02:00
|
|
|
showBtnsDelay = 150;
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2013-10-21 16:53:46 +02:00
|
|
|
for(int chan = WPAD_MAX_WIIMOTES-1; chan >= 0; chan--)
|
|
|
|
{
|
|
|
|
if(WPadIR_Valid(chan) || m_show_pointer[chan])
|
|
|
|
{
|
|
|
|
showBtnsDelay = 150;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(showBtnsDelay)
|
|
|
|
showBtnsDelay--;
|
|
|
|
if(showBtnsDelay == 0)
|
2012-01-21 21:57:41 +01:00
|
|
|
_hideCFTheme();
|
2013-10-21 16:53:46 +02:00
|
|
|
else
|
|
|
|
_showCFTheme(curParam, cfVersion, wide);
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.flip(true, curParam == 16);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
_hideCFTheme();
|
|
|
|
_loadCFLayout(1);
|
2012-11-11 19:28:03 +01:00
|
|
|
CoverFlow.clear();
|
|
|
|
CoverFlow.simulateOtherScreenFormat(false);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CMenu::_cfParam(bool inc, int i, const CMenu::SCFParamDesc &p, int cfVersion, bool wide)
|
|
|
|
{
|
|
|
|
int k = i / 4;
|
|
|
|
string key(p.key[k]);
|
2012-11-11 19:28:03 +01:00
|
|
|
const char *d = _cfDomain((p.domain != CMenu::SCFParamDesc::PDD_NORMAL && CoverFlow.selected()) || p.domain == CMenu::SCFParamDesc::PDD_SELECTED);
|
2012-11-18 14:40:26 +01:00
|
|
|
string domain(fmt(d, cfVersion));
|
2012-01-21 21:57:41 +01:00
|
|
|
float step = p.step[k];
|
|
|
|
if (!wide && p.scrnFmt && (p.paramType[k] == CMenu::SCFParamDesc::PDT_V3D || p.paramType[k] == CMenu::SCFParamDesc::PDT_FLOAT || p.paramType[k] == CMenu::SCFParamDesc::PDT_INT))
|
|
|
|
key += "_4_3";
|
|
|
|
if (!inc)
|
|
|
|
step = -step;
|
|
|
|
switch (p.paramType[k])
|
|
|
|
{
|
|
|
|
case CMenu::SCFParamDesc::PDT_EMPTY:
|
|
|
|
break;
|
|
|
|
case CMenu::SCFParamDesc::PDT_FLOAT:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
float val = m_coverflow.getFloat(domain, key);
|
|
|
|
m_coverflow.setFloat(domain, key, min(max(p.minMaxVal[k][0], val + step), p.minMaxVal[k][1]));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_V3D:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
Vector3D v(m_coverflow.getVector3D(domain, key));
|
2012-01-21 21:57:41 +01:00
|
|
|
switch (i % 4)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
v.x = min(max(p.minMaxVal[k][0], v.x + step), p.minMaxVal[k][1]);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
v.y = min(max(p.minMaxVal[k][0], v.y + step), p.minMaxVal[k][1]);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
v.z = min(max(p.minMaxVal[k][0], v.z + step), p.minMaxVal[k][1]);
|
|
|
|
break;
|
|
|
|
}
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setVector3D(domain, key, v);
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_COLOR:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
CColor color(m_coverflow.getColor(domain, key));
|
2012-01-21 21:57:41 +01:00
|
|
|
switch (i % 4)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
color.r = min(max(0, color.r + (int)step), 0xFF);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
color.g = min(max(0, color.g + (int)step), 0xFF);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
color.b = min(max(0, color.b + (int)step), 0xFF);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
color.a = min(max(0, color.a + (int)step), 0xFF);
|
|
|
|
break;
|
|
|
|
}
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setColor(domain, key, color);
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_BOOL:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setBool(domain, key, !m_coverflow.getBool(domain, key));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_INT:
|
|
|
|
{
|
2016-04-30 16:19:30 +02:00
|
|
|
int val = m_coverflow.getInt(domain, key);
|
|
|
|
m_coverflow.setInt(domain, key, min(max((int)p.minMaxVal[k][0], val + (int)step), (int)p.minMaxVal[k][1]));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case CMenu::SCFParamDesc::PDT_TXTSTYLE:
|
|
|
|
{
|
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
|
|
|
int i = styleToIdx(_textStyle(domain.c_str(), key.c_str(), CoverFlow.selected() ? FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_TOP : FTGX_JUSTIFY_CENTER | FTGX_ALIGN_BOTTOM, true));
|
2012-01-21 21:57:41 +01:00
|
|
|
i = loopNum(i + (int)step, 9);
|
2016-04-30 16:19:30 +02:00
|
|
|
m_coverflow.setString(domain, key, styleToTxt(g_txtStyles[i]));
|
2012-01-21 21:57:41 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-15 15:47:42 +02:00
|
|
|
const char *CMenu::_cfDomain(bool selected)
|
|
|
|
{
|
- PHASE 2 (finally!)
- New Coverflow theme format. no more emuflow, coverflow, brewflow. now we have coverflow, shortflow, sideflow, and smallflow.
- coverflow is the normal coverflow.
- shortflow is automatically used for plugins if all selected plugins require a short CD style cover such as GB, GBC, GBA, and playstation. if there's more let me know and i can add them.
- sideflow is automatically used for plugins if all selected plugins require a cover on its side such as SNES and Nintendo 64.
- smallflow is used if smallbox is set for homebrew and sourceflow.
- no more need for emuflow= with a source btn in the source menu. it is done automatically now using the plugins magic#
- each flow has its own number of modes/layouts. so now coveflow can have 8, smallfow 1, sideflow, 6, and shortflow 4 or whatever you want.
- adjust coverflow works with no problems. just choose the view first before entering the adjust coverflow menu.
- other minor code changes here and there.
- remember themes are now in themes_lite and the coverflow part is seperated and put in the coverflows folder with the same name as the theme or you can use a default coverflow named default.ini for all themes.
2016-05-11 19:58:36 +02:00
|
|
|
return selected ? fmt("%s_%%i_S", cf_domain) : fmt("%s_%%i", cf_domain);
|
2012-04-15 15:47:42 +02:00
|
|
|
}
|
|
|
|
|
2012-11-03 20:16:03 +01:00
|
|
|
void CMenu::_initCFThemeMenu()
|
2012-01-21 21:57:41 +01:00
|
|
|
{
|
2012-12-28 15:19:40 +01:00
|
|
|
TexData emptyTex;
|
2012-01-21 21:57:41 +01:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
2013-11-04 20:46:23 +01:00
|
|
|
m_cfThemeBtnAlt = _addButton("CFTHEME/ALT_BTN", theme.btnFont, L"", 20, 20, 80, 32, theme.btnFontColor);
|
|
|
|
m_cfThemeBtnSelect = _addButton("CFTHEME/SELECT_BTN", theme.btnFont, L"", 100, 20, 80, 32, theme.btnFontColor);
|
|
|
|
m_cfThemeBtnWide = _addButton("CFTHEME/WIDE_BTN", theme.btnFont, L"", 436, 20, 80, 32, theme.btnFontColor);
|
|
|
|
m_cfThemeLblParam = _addLabel("CFTHEME/PARAM_BTN", theme.btnFont, L"", 212, 20, 192, 32, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
|
|
|
m_cfThemeBtnParamM = _addPicButton("CFTHEME/PARAM_MINUS", theme.btnTexMinus, theme.btnTexMinusS, 180, 20, 32, 32);
|
|
|
|
m_cfThemeBtnParamP = _addPicButton("CFTHEME/PARAM_PLUS", theme.btnTexPlus, theme.btnTexPlusS, 404, 20, 32, 32);
|
|
|
|
m_cfThemeBtnSave = _addButton("CFTHEME/SAVE_BTN", theme.btnFont, L"Save", 516, 20, 104, 32, theme.btnFontColor);
|
|
|
|
m_cfThemeBtnCancel = _addButton("CFTHEME/CANCEL_BTN", theme.btnFont, L"Cancel", 516, 54, 104, 32, theme.btnFontColor);
|
2012-01-21 21:57:41 +01:00
|
|
|
//
|
|
|
|
for (int i = 0; i < 16; ++i)
|
|
|
|
{
|
2013-09-24 17:21:31 +02:00
|
|
|
char *domain = fmt_malloc("CFTHEME/VAL%i%c_%%s", i / 3 + 1, (char)(i % 3) + 'A');
|
|
|
|
if(domain == NULL) continue;
|
2012-01-21 21:57:41 +01:00
|
|
|
x = 20 + (i / 4) * 150;
|
|
|
|
y = 340 + (i % 4) * 32;
|
2013-09-24 17:21:31 +02:00
|
|
|
m_cfThemeLblVal[i] = _addLabel(fmt(domain, "BTN"), theme.btnFont, L"", x + 32, y, 86, 32, theme.btnFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE, theme.btnTexC);
|
|
|
|
m_cfThemeBtnValM[i] = _addPicButton(fmt(domain, "MINUS"), theme.btnTexMinus, theme.btnTexMinusS, x, y, 32, 32);
|
|
|
|
m_cfThemeBtnValP[i] = _addPicButton(fmt(domain, "PLUS"), theme.btnTexPlus, theme.btnTexPlusS, x + 118, y, 32, 32);
|
|
|
|
MEM2_free(domain);
|
2012-01-21 21:57:41 +01:00
|
|
|
}
|
|
|
|
for (int i = 0; i < 4; ++i)
|
2013-11-04 20:46:23 +01:00
|
|
|
m_cfThemeLblValTxt[i] = _addLabel(fmt("CFTHEME/VAL%i_LBL", i + 1), theme.lblFont, L"", 20 + i * 150, 98, 150, 240, theme.lblFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_BOTTOM, emptyTex);
|
2012-01-21 21:57:41 +01:00
|
|
|
_hideCFTheme(true);
|
|
|
|
}
|