マスタエディタ:リージョンとペアレンタルコントロールの設定の連動を作成中。

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2166 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
nishikawa_takeshi 2008-08-15 09:26:38 +00:00
parent c663e457fe
commit d91e9fd056
5 changed files with 112 additions and 2 deletions

View File

@ -1483,6 +1483,7 @@ private: System::Windows::Forms::Label^ labCautionCheck;
this->combRegion->Name = L"combRegion";
this->combRegion->Size = System::Drawing::Size(216, 20);
this->combRegion->TabIndex = 36;
this->combRegion->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::combRegion_SelectedIndexChanged);
//
// cboxIsWiFiIcon
//
@ -4695,6 +4696,101 @@ private: System::Windows::Forms::Label^ labCautionCheck;
this->tboxBackupOther->Clear();
}
}
private:
// ペアレンタルコントロール情報をクリアする
void clearParental( System::Windows::Forms::ComboBox ^comb,
System::Windows::Forms::CheckBox ^enable,
System::Windows::Forms::CheckBox ^rp )
{
comb->SelectedIndex = comb->Items->Count - 1; // 「未審査」にする
enable->Checked = false;
rp->Checked = false;
}
private:
// ペアレンタルコントロール情報を編集できるようにする
void enableParental( System::Windows::Forms::ComboBox ^comb,
System::Windows::Forms::CheckBox ^enable,
System::Windows::Forms::CheckBox ^rp )
{
comb->Enabled = true;
enable->Enabled = true;
rp->Enabled = true;
}
// ペアレンタルコントロール情報を編集できなくする
void disableParental( System::Windows::Forms::ComboBox ^comb,
System::Windows::Forms::CheckBox ^enable,
System::Windows::Forms::CheckBox ^rp )
{
this->clearParental( comb, enable, rp );
comb->Enabled = false;
enable->Enabled = false;
rp->Enabled = false;
}
private:
System::Void combRegion_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
switch( this->combRegion->SelectedIndex )
{
case 0:
// 日本
this->enableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO );
this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB );
this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK );
this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI );
this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT );
this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC );
this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC );
break;
case 1:
// 米国
this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO );
this->enableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB );
this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK );
this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI );
this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT );
this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC );
this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC );
break;
case 2:
// 欧州
this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO );
this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB );
this->enableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK );
this->enableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI );
this->enableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT );
this->enableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC );
this->disableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC );
break;
case 3:
// 豪州
this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO );
this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB );
this->disableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK );
this->disableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI );
this->disableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT );
this->disableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC );
this->enableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC );
break;
case 4:
// 欧州と豪州
this->disableParental( this->combCERO, this->cboxCERO, this->cboxAlwaysCERO );
this->disableParental( this->combESRB, this->cboxESRB, this->cboxAlwaysESRB );
this->enableParental( this->combUSK, this->cboxUSK, this->cboxAlwaysUSK );
this->enableParental( this->combPEGI, this->cboxPEGI, this->cboxAlwaysPEGI );
this->enableParental( this->combPEGIPRT, this->cboxPEGIPRT, this->cboxAlwaysPEGIPRT );
this->enableParental( this->combPEGIBBFC, this->cboxPEGIBBFC, this->cboxAlwaysPEGIBBFC );
this->enableParental( this->combOFLC, this->cboxOFLC, this->cboxAlwaysOFLC );
break;
default:
break;
}
}
private:
// 日本語版への切り替え
@ -4728,8 +4824,6 @@ private: System::Windows::Forms::Label^ labCautionCheck;
}
}
}; // enf of ref class Form1
} // end of namespace MasterEditorTWL

View File

@ -306,6 +306,22 @@ ECSrlResult RCSrl::setRomHeader(void)
this->pRomHeader->s.exFlags.WiFiConnectionIcon = (*(this->hIsWiFiIcon) == true)?1:0;
this->pRomHeader->s.exFlags.DSWirelessIcon = (*(this->hIsWirelessIcon) == true)?1:0;
// ƒŒ<C692>[ƒeƒBƒ“ƒO
const u32 maskJapan = 0x00000001;
const u32 maskAmerica = 0x00000002;
const u32 maskEurope = 0x00000004;
const u32 maskAustralia = 0x00000008;
//const u32 maskChina = 0x00000010;
//const u32 maskKorea = 0x00000020;
u32 map = 0;
if( *(this->hIsRegionJapan) == true ) { map |= maskJapan; }
if( *(this->hIsRegionAmerica) == true ) { map |= maskAmerica; }
if( *(this->hIsRegionEurope) == true ) { map |= maskEurope; }
if( *(this->hIsRegionAustralia) == true ){ map |= maskAustralia; }
//if( *(this->hIsRegionChina) == true ) { map |= maskChina; }
//if( *(this->hIsRegionKorea) == true ) { map |= maskKorea; }
this->pRomHeader->s.card_region_bitmap = map;
// ペアレンタルコントロール
for( i=0; i < PARENTAL_CONTROL_INFO_SIZE; i++ )
{