#include "orimpexpcamera_popup.h"
ORPopupCameraExport::ORPopupCameraExport()
{
UICreate ();
UIConfigure ();
}
void ORPopupCameraExport::UICreate()
{
int lS = 5;
int lH = 25;
Region.X = 100;
Region.Y = 100;
Region.Width = 200;
Region.Height = 200;
Caption = "Camera Export";
AddRegion( "LabelFilename", "LabelFilename",
AddRegion( "ButtonProperties", "ButtonProperties",
AddRegion( "ButtonAnimation", "ButtonAnimation",
AddRegion( "ButtonMesh", "ButtonMesh",
AddRegion( "ButtonExport", "ButtonExport",
AddRegion( "ButtonCancel", "ButtonCancel",
SetControl( "LabelFilename", mLabelFilename );
SetControl( "ButtonProperties", mButtonProperties );
SetControl( "ButtonAnimation", mButtonAnimation );
SetControl( "ButtonMesh", mButtonMesh );
SetControl( "ButtonExport", mButtonExport );
SetControl( "ButtonCancel", mButtonCancel );
}
void ORPopupCameraExport::UIConfigure()
{
mLabelFilename.Caption = "No File";
mButtonProperties.Caption = "Properties";
mButtonAnimation.Caption = "Animation";
mButtonMesh.Caption = "Mesh";
mButtonExport.Caption = "Export";
mButtonCancel.Caption = "Cancel";
mButtonExport.OnClick.Add(
this, (
FBCallback)&ORPopupCameraExport::EventButtonExportClick );
mButtonCancel.OnClick.Add(
this, (
FBCallback)&ORPopupCameraExport::EventButtonCancelClick );
}
void ORPopupCameraExport::SetFilename( const char* pFilename )
{
mFilename = pFilename;
mLabelFilename.Caption = mFilename;
}
void ORPopupCameraExport::EventButtonExportClick(
HISender pSender,
HKEvent pEvent )
{
mEngine->SetPropertiesExport( mButtonProperties.State != 0 );
mEngine->SetMeshExport ( mButtonMesh.State != 0 );
mEngine->SetAnimationExport ( mButtonAnimation.State != 0 );
mEngine->Export( mFilename );
Close();
}
void ORPopupCameraExport::EventButtonCancelClick(
HISender pSender,
HKEvent pEvent )
{
Close();
}