component PlayerShowSettingModel {
	bool isMobile;
    public PlayerShowSettingModel()
    {
		isMobile = false;
    }
	public void OnClickPlayerViewUnlimitedSetting()
	{
		isMobile = hel_isMobile();
		// もしスマホで表示されてしまっていた場合でも処理しない
		if(!isMobile){
        	// 無制限に表示するかどうかのダイアログを出す
        	hsCommonDialogSetUseCloseButton(true);
        	hsCommonDialogSetUseYesNoButton(true);
        	hsCommonDialogSetYesButtonText( (hsIsLangJA()? "決定" : "Yes") );
        	hsCommonDialogSetNoButtonText( (hsIsLangJA()? "キャンセル" : "No") );
        	hsCommonDialogSetText( (hsIsLangJA() ? "アバター表示数を無制限にすると、動作が重くなる可能性があります。無制限に変更しますか？" :
			 "Warning! Setting the count of shown avatars to Unlimited may affect performance. Are you sure you want to proceed?") );
        	hsCommonDialogSetTextAlignment(HSAlignCM);
        	hsCommonDialogSetTextOverflowWrap(true);
        	hsCommonDialogSetYesButtonDelegate(_PlayerViewUnlimitedCallback);

			hsCommonDialogOpen("canvas");
		}
	}
	void _PlayerViewUnlimitedCallback()
    {
		hsCanvasResetToggleDefault("SettingSystem_UserView_medium");
        hsCanvasResetToggleDefault("SettingSystem_UserView_many");
        hsCanvasResetToggleDefault("SettingSystem_UserView_unlimited");
		hsCanvasToggleChange("SettingSystem_UserView_unlimited");

		hsSetShowAvatarDisplayed(HSAvatar_Unlimited);

        hsCommonDialogClose();
    }
}
