Skip to content

Commit

Permalink
Update GUI to Version 3.0.1
Browse files Browse the repository at this point in the history
- support latest Core (fixed Bug)
- fixed some GUI bugs (pageNext/pagePrevious of Map/Chara)
  • Loading branch information
nedron92 committed Nov 27, 2016
1 parent 499b7f9 commit f678c04
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion source/gui/ZeldaEditAdventureModeMaps.cpp
Expand Up @@ -74,7 +74,7 @@ void CZeldaEditAdventureModeMaps::DoDataExchange(CDataExchange* pDX)
else
GetDlgItem(IDC_AMMAP_PAGE_PREVIOUS)->EnableWindow(true);

if (this->i_map + 1 > save->get_adventureMode_maxMaps() - HWLSaveEdit::HWLAdventureModeMaps::get_disabledMapCounter())
if ((this->i_map - this->i_skipped_maps) + 1 >= save->get_adventureMode_maxMaps() - HWLSaveEdit::HWLAdventureModeMaps::get_disabledMapCounter())
GetDlgItem(IDC_AMMAP_PAGE_NEXT)->EnableWindow(false);
else
GetDlgItem(IDC_AMMAP_PAGE_NEXT)->EnableWindow(true);
Expand Down
50 changes: 32 additions & 18 deletions source/gui/ZeldaEditCharaOverviewDlg.cpp
Expand Up @@ -194,33 +194,47 @@ void CZeldaEditCharaOverviewDlg::OnBnClickedEditButton(UINT nID)
{
i_skipped_charas += 2;
i_chara_id += 2;
}

if (save->get_player(i_chara_id)->get_isDisabled())
{
int i_old_chara_id = i_chara_id;

for (int i = i_chara_id + 1; i < HWLSaveEdit::HWLPlayer::vs_players.size(); i++)
if (save->get_player(i_chara_id)->get_isDisabled())
{
if (save->get_player(i)->get_isDisabled())
int i_old_chara_id = i_chara_id;
i_skipped_charas++;

for (int i = i_chara_id + 1; i < HWLSaveEdit::HWLPlayer::vs_players.size(); i++)
{
i_skipped_charas++;
continue;
if (save->get_player(i)->get_isDisabled())
{
i_skipped_charas++;
continue;
}
else
{
i_chara_id = i;
break;
}
}
else
i_chara_id = i;
break;
}

if (i_old_chara_id == i_chara_id)
if (i_old_chara_id == i_chara_id)
{
CString cs_info("This character is disabled, that mean you don't have the right Update/DLC installed to edit "
"this character.");
MessageBox(cs_info, L"Information", MB_OK | MB_ICONINFORMATION);
b_failure = true;
}
}else
{
CString cs_info("This character is disabled, that mean you don't have the right Update/DLC installed to edit "
"this character.");
MessageBox(cs_info, L"Information", MB_OK | MB_ICONINFORMATION);
b_failure = true;
for (int i = 21; i < i_chara_id; i++)
{
if (save->get_player(i)->get_isDisabled())
{
i_skipped_charas++;
i_chara_id++;
}
}
}
}


if (!b_failure)
{
CZeldaEditCharaStatsDlg dlg(NULL, i_chara_id, i_skipped_charas);
Expand Down
2 changes: 1 addition & 1 deletion source/gui/ZeldaEditCharaStatsDlg.cpp
Expand Up @@ -71,7 +71,7 @@ void CZeldaEditCharaStatsDlg::DoDataExchange(CDataExchange* pDX)
if (this->i_chara_id <= 0)
GetDlgItem(IDC_CSTATS_PAGE_PREVIOUS)->EnableWindow(false);

if (this->i_chara_id + 1 >= HWLSaveEdit::HWLPlayer::vs_players.size() - HWLSaveEdit::HWLPlayer::get_disabledPlayerCounter() + 2)
if ((this->i_chara_id + 1) - this->i_skipped_charas >= HWLSaveEdit::HWLPlayer::vs_players.size() - HWLSaveEdit::HWLPlayer::get_disabledPlayerCounter())
GetDlgItem(IDC_CSTATS_PAGE_NEXT)->EnableWindow(false);

this->calc_stats();
Expand Down
2 changes: 1 addition & 1 deletion source/gui/ZeldaEditCharaWeaponsDlg.cpp
Expand Up @@ -128,7 +128,7 @@ void CZeldaEditCharaWeaponsDlg::DoDataExchange(CDataExchange* pDX)
else
GetDlgItem(IDC_CWEAPON_CHAR_PAGE_PREVIOUS)->EnableWindow(true);

if (this->i_chara_id + 1 >= HWLSaveEdit::HWLPlayer::vs_players.size() - HWLSaveEdit::HWLPlayer::get_disabledPlayerCounter() + 2)
if ((this->i_chara_id + 1) - this->i_skipped_charas >= HWLSaveEdit::HWLPlayer::vs_players.size() - HWLSaveEdit::HWLPlayer::get_disabledPlayerCounter())
GetDlgItem(IDC_CWEAPON_CHAR_PAGE_NEXT)->EnableWindow(false);
else
GetDlgItem(IDC_CWEAPON_CHAR_PAGE_NEXT)->EnableWindow(true);
Expand Down
Binary file modified source/gui/ZeldaHWLSaveEditorGUI.rc
Binary file not shown.

0 comments on commit f678c04

Please sign in to comment.