bool GCBanner::Load( const u8* GCBannAshData, u32 GCBannAshSize ) { if( loaded ) { return true; } if( !GCBannAshData || !GCBannAshSize ) { return false; } U8Archive arc( GCBannAshData, GCBannAshSize ); if( !( lyt = LoadLayout( arc, "my_GCTop_a" ) ) ) { return false; } if( !( lan = LoadAnimation( arc, "my_GCTop_a_BackLoop" ) ) ) { return false; } obj->BindPane( lyt->FindPane( "RootPane" ) ); obj->BindMaterials( lyt->Materials() ); obj->AddAnimation( lan ); obj->SetAnimation( "my_GCTop_a_BackLoop" ); obj->Start(); loaded = true; return true; }
void RemoveLayout(struct layout *lay) { struct layout **layp = &layouts; for (; *layp; layp = &(*layp)->lay_next) { if (*layp == lay) { *layp = lay->lay_next; break; } } laytab[lay->lay_number] = (struct layout *)0; if (display && D_layout == lay) D_layout = (struct layout *)0; FreeLayoutCv(&lay->lay_canvas); if (lay->lay_title) free(lay->lay_title); free(lay); if (layouts) LoadLayout((display && D_layout) ? D_layout : *layp ? *layp : layouts); Activate(0); }
KeyboardLayout::KeyboardLayout () { #ifndef WINCE mDeadKeyTableListHead = nsnull; #endif LoadLayout (::GetKeyboardLayout(0)); }
void PageActions::OpenLayout(const PageLayout &layout) { LeavePage(); PagesState &state = CommonInterface::SetUIState().pages; state.special_page = layout; LoadLayout(layout); }
void MMXCore::LoadBackground() { WORD pLevel = level*3; pLayout = snes2pc(SReadDWord(0x868F4F + pLevel)); pScenes = snes2pc(SReadDWord(0x868FBE + pLevel)); pBlocks = snes2pc(SReadDWord(0x86902D + pLevel)); LoadTilesAndPalettes(); LoadLayout(); LoadLevelLayout(); }
bool CFormBackendImp::LoadLayout( const GUCEF::CORE::CString& layoutStoragePath ) {GUCEF_TRACE; VFS::CVFS::CVFSHandlePtr filePtr = VFS::CVfsGlobal::Instance()->GetVfs().GetFile( layoutStoragePath ); if ( NULL != filePtr ) { return LoadLayout( *filePtr->GetAccess() ); } return false; }
void MainWindow::LoadSaveLayout(QAction *action, bool save) { if(action == NULL) { qWarning() << "NULL action passed to LoadSaveLayout - bad signal?"; return; } bool success = false; if(action == ui->action_Save_Default_Layout) { success = SaveLayout(0); } else if(action == ui->action_Load_Default_Layout) { success = LoadLayout(0); } else { QString name = action->objectName(); name.remove(0, name.size() - 1); int idx = name.toInt(); if(idx > 0) { if(save) success = SaveLayout(idx); else success = LoadLayout(idx); } } if(!success) { if(save) RDDialog::critical(this, "Error saving layout", "Couldn't save layout"); else RDDialog::critical(this, "Error loading layout", "Couldn't load layout"); } }
void PageActions::Restore() { PageLayout &special_page = CommonInterface::SetUIState().pages.special_page; if (!special_page.IsDefined()) return; special_page.SetUndefined(); LoadLayout(GetConfiguredLayout()); RestoreMapZoom(); }
void MMXCore::LoadLevel() { LoadTilesAndPalettes(); WORD pLevel = level*3; pLayout = snes2pc(SReadDWord(p_layout[type] + pLevel)); pScenes = snes2pc(SReadDWord(p_scenes[type] + pLevel)); pBlocks = snes2pc(SReadDWord(p_blocks[type] + pLevel)); pMaps = snes2pc(SReadDWord(p_maps [type] + pLevel)); pCollisions = snes2pc(SReadDWord(p_collis[type] + pLevel)); //ppppp = snes2pc(SReadDWord(p_unknow[type] + pLevel)); //ppppp = ppppp; LoadLayout(); LoadLevelLayout(); }
bool CFormBackendImp::LoadLayout( const GUCEF::CORE::CString& layoutStoragePath ) {GUCEF_TRACE; VFS::CVFS& vfs = VFS::CVfsGlobal::Instance()->GetVfs(); VFS::CVFS::CVFSHandlePtr file = vfs.GetFile( layoutStoragePath ); if ( !file.IsNULL() ) { CORE::CIOAccess* fileAccess = file->GetAccess(); if ( NULL != fileAccess ) { return LoadLayout( *fileAccess ); } } return false; }
// ---------------------------------------------------------------------------- ProjectData::ProjectData(cbProject* pcbProject) // ---------------------------------------------------------------------------- { //ctor #if defined(LOGGING) if (not pcbProject) asm("int3"); /*trap*/; #endif if (not pcbProject) return; m_pCBProject = pcbProject; m_ProjectFilename = pcbProject->GetFilename(); m_CurrIndexEntry = 0; m_LastIndexEntry = MaxEntries-1; m_pEdMgr = Manager::Get()->GetEditorManager(); m_ActivationCount = 0; m_bLayoutLoaded = false; LoadLayout(); }
void NewLayout(char *title, int startat) { Layout *lay; Canvas *fcv; lay = CreateLayout(title, startat); if (!lay) return; if (display) { LoadLayout(0); fcv = D_forecv; DupLayoutCv(&D_canvas, &lay->lay_canvas, true); lay->lay_forecv = D_forecv; D_forecv = fcv; D_layout = lay; } else { layout_attach = lay; } lay->lay_autosave = 1; }
bool ToolTip::Load( const u8* balloonAshData, u32 balloonAshSize ) { DELETE( obj ); DELETE( layout ); DELETE( brlan ); tbox = NULL; loaded = false; if( !balloonAshData || !balloonAshSize ) { return false; } U8Archive arc( balloonAshData, balloonAshSize ); if( !( layout = LoadLayout( arc, "my_IplTopBalloon_a" ) ) ) { return false; } if( !(tbox = layout->FindTextbox( "T_Balloon" ) ) ) { return false; } if( !(brlan = LoadAnimation( arc, "my_IplTopBalloon_a_balloonInOut" ) ) ) { return false; } //tbox->SetText( NULL ); obj = new Object; obj->AddAnimation( brlan ); obj->BindPane( layout->FindPane( "RootPane" )); obj->SetAnimation( "my_IplTopBalloon_a_balloonInOut", 0, -1, -1, true, true ); obj->Start(); loaded = true; return true; }
MainWindow::MainWindow(CaptureContext *ctx) : QMainWindow(NULL), ui(new Ui::MainWindow), m_Ctx(ctx) { ui->setupUi(this); setAcceptDrops(true); QObject::connect(ui->action_Load_Default_Layout, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_1, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_2, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_3, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_4, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_5, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Load_Layout_6, &QAction::triggered, this, &MainWindow::loadLayout_triggered); QObject::connect(ui->action_Save_Default_Layout, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_1, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_2, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_3, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_4, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_5, &QAction::triggered, this, &MainWindow::saveLayout_triggered); QObject::connect(ui->action_Save_Layout_6, &QAction::triggered, this, &MainWindow::saveLayout_triggered); statusIcon = new QLabel(this); ui->statusBar->addWidget(statusIcon); statusText = new QLabel(this); ui->statusBar->addWidget(statusText); statusProgress = new QProgressBar(this); ui->statusBar->addWidget(statusProgress); statusProgress->setVisible(false); statusProgress->setMinimumSize(QSize(200, 0)); statusProgress->setMinimum(0); statusProgress->setMaximum(1000); statusIcon->setText(""); statusIcon->setPixmap(QPixmap()); statusText->setText(""); QObject::connect(&m_MessageTick, &QTimer::timeout, this, &MainWindow::messageCheck); m_MessageTick.setSingleShot(false); m_MessageTick.setInterval(500); m_MessageTick.start(); ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px }"); SetTitle(); PopulateRecentFiles(); PopulateRecentCaptures(); ui->toolWindowManager->setRubberBandLineWidth(50); ui->toolWindowManager->setToolWindowCreateCallback([this](const QString &objectName) -> QWidget * { return m_Ctx->createToolWindow(objectName); }); ui->action_Resolve_Symbols->setEnabled(false); ui->action_Resolve_Symbols->setText(tr("Resolve Symbols")); bool loaded = LoadLayout(0); // create default layout if layout failed to load if(!loaded) { EventBrowser *eventBrowser = m_Ctx->eventBrowser(); ui->toolWindowManager->addToolWindow(eventBrowser, ToolWindowManager::EmptySpace); TextureViewer *textureViewer = m_Ctx->textureViewer(); ui->toolWindowManager->addToolWindow( textureViewer, ToolWindowManager::AreaReference(ToolWindowManager::RightOf, ui->toolWindowManager->areaOf(eventBrowser), 0.75f)); PipelineStateViewer *pipe = m_Ctx->pipelineViewer(); ui->toolWindowManager->addToolWindow( pipe, ToolWindowManager::AreaReference(ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(textureViewer))); BufferViewer *mesh = m_Ctx->meshPreview(); ui->toolWindowManager->addToolWindow( mesh, ToolWindowManager::AreaReference(ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(textureViewer))); CaptureDialog *capDialog = m_Ctx->captureDialog(); ui->toolWindowManager->addToolWindow( capDialog, ToolWindowManager::AreaReference(ToolWindowManager::AddTo, ui->toolWindowManager->areaOf(textureViewer))); APIInspector *apiInspector = m_Ctx->apiInspector(); ui->toolWindowManager->addToolWindow( apiInspector, ToolWindowManager::AreaReference(ToolWindowManager::BottomOf, ui->toolWindowManager->areaOf(eventBrowser), 0.3f)); } m_Ctx->AddLogViewer(this); }
RheiaMainFrame::RheiaMainFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): RheiaManagedFrame(parent, id, title, pos, size, style) { BuildMenu(); /* First build the aui components */ BuildAui(); /* now create the info window */ wxAuiNotebook* book = RheiaInfoPaneManager::Get(this)->CreateWindow(this); RheiaInfoPaneManager::Get(this)->BuildMenu( m_menuBar ); m_layout->AddPane( book , wxAuiPaneInfo(). Name(wxT("InfoPane")).Caption(_("Information")). BestSize(600,500).MinSize(wxSize(100,100)).MaximizeButton(true). MinimizeButton(true). Bottom().Layer(0)); /* now create the info window */ book = RheiaLeftPaneManager::Get(this)->CreateWindow(this); RheiaLeftPaneManager::Get(this)->BuildMenu( m_menuBar ); m_layout->AddPane( book , wxAuiPaneInfo(). Name(wxT("ManagementPane")).Caption(_("Management")). BestSize(300,600).MinSize(wxSize(100,100)).MaximizeButton(true). MinimizeButton(true). Left().Layer(1)); /*** Now add the workspace manager to the left pane's manager */ RheiaLeftPaneManager::Get(this)->AddPage( wxT("Workspaces") , RheiaWorkspaceManager::Get(this) ); RheiaWorkspaceManager::Get(this)->BuildMenu( m_menuBar ); RheiaLoggerManager::Get(this)->InitializeEnvironment(); RheiaLoggerManager::Get(this)->BuildMenu(m_menuBar); RheiaLogger* log = RheiaLoggerManager::Get(this)->GetRheiaDebugLogger(); log->Log( wxT("RheiaMainFrame::Registering Rheia Events..."), RheiaLogging::info ); RheiaEditorManager::Get(this)->BuildMenu( m_menuBar ); /* RheiaEditorPropertyPanel* m_pppanel = new RheiaEditorPropertyPanel(this,NULL); m_layout->AddPane( m_pppanel , wxAuiPaneInfo(). Name(wxT("ManagementPane")).Caption(_("Editor Configuration")). BestSize(300,600).MinSize(wxSize(100,100)). Right().Layer(1));*/ /*** Build toolbars */ wxAuiToolBar* prjtb = RheiaWorkspaceManager::Get(this)->BuildProjectsToolBar(this); RheiaToolBarManager::Get(this)->AddToolBar(wxT("Projects"),prjtb); wxAuiToolBar* wksptb = RheiaWorkspaceManager::Get(this)->BuildToolBar(this); RheiaToolBarManager::Get(this)->AddToolBar(wxT("Workspaces"),wksptb); RheiaEditorManager::Get(this)->BuildToolBar( this ); // // RheiaInfoPaneManager::Get(this)->AddPage(wxT("Python console"), RheiaPythonConsoleManager::Get(this)); // RheiaPythonConsoleManager::Get(this)->BuildMenu(m_menuBar); // //// wxBitmap bmp = RheiaLoadBitmap(RheiaStandardPaths::DataDirectoryGlobal() + (_T("/share/rheia/images/rheia_24.jpg")) , wxBITMAP_TYPE_JPEG ); //// wxIcon icon; //// icon.CopyFromBitmap( bmp ); //// SetIcon( icon ); // /* First build the status bar */ log->Log( wxT("RheiaMainFrame::Building Rheia status bar..."), RheiaLogging::info); BuildStatusBar(); /* Displays a welcome message in the status bar */ #if wxUSE_STATUSBAR SetStatusText(_("Welcome to Rheia !")); #endif // wxUSE_STATUSBAR log->Log( wxT("RheiaMainFrame::Loading user profile..."), RheiaLogging::info); LoadLayout(); log->Log( wxT("RheiaMainFrame::Initializing package data base..."), RheiaLogging::info); RheiaPackageDBManager::Get(); log->Log( wxT("RheiaMainFrame::Checking for pending packages..."), RheiaLogging::info); RheiaPackageManager::Get()->InstallPendingPackages( true ); log->Log( wxT("RheiaMainFrame::Loading installed plugins..."), RheiaLogging::info); RheiaPluginManager::Get()->LoadAllPlugins(); RheiaPackageManager::Get()->BuildMenu( this , m_menuBar ); log->Log( wxT("RheiaMainFrame::Initializing package data base..."), RheiaLogging::info); RheiaPackageDBManager::Get(); log->Log( wxT("RheiaMainFrame::Checking for pending packages..."), RheiaLogging::info); RheiaPackageManager::Get()->InstallPendingPackages( true ); log->Log( wxT("RheiaMainFrame::Loading installed plugins..."), RheiaLogging::info); RheiaPluginManager::Get()->LoadAllPlugins(); RheiaFramePluginManager::Get(this)->LoadAllPlugins(); m_startpage = new RheiaStartPageContainer( this, wxT("nm_test_page.html") ); RheiaCenterPaneManager::Get(this)->AddPage( wxT("Start here") , m_startpage ); m_layout->Update(); RegisterEvents(); }
//============================================================================= // MainFrame //============================================================================= wxGD::MainFrame::MainFrame( Handler *handler, wxWindow *parent ) : wxFrame(parent, wxID_ANY, "wxGUIDesigner", wxDefaultPosition, wxSize(630,480), wxDEFAULT_FRAME_STYLE | wxTAB_TRAVERSAL), m_handler (handler), m_panel (NULL), m_mgr (NULL) { //============================================================================= // Icon bundle //============================================================================= wxBitmap bmpLogo = wxXmlResource::Get()->LoadBitmap("logo"); if( bmpLogo.IsOk() ) { wxImage imgLogo = bmpLogo.ConvertToImage(); wxIcon ico16, ico32; wxIconBundle bundle; ico16.CopyFromBitmap( imgLogo.Scale(16,16) ); bundle.AddIcon(ico16); ico32.CopyFromBitmap( imgLogo.Scale(32,32) ); bundle.AddIcon(ico32); SetIcons(bundle); } //============================================================================= // Bars //============================================================================= wxMenuBar *menuBar = wxXmlResource::Get()->LoadMenuBar("MainMenu"); SetMenuBar(menuBar); if(menuBar) { wxMenu *menuFile = menuBar->GetMenu(0); if(menuFile) m_history.UseMenu(menuFile); } SetToolBar( wxXmlResource::Get()->LoadToolBar(this, "ToolBar") ); CreateStatusBar(1); SetMinSize( wxSize(630,480) ); //============================================================================= // AUI //============================================================================= m_panel = new wxPanel(this, wxID_ANY); m_mgr = new wxAuiManager(m_panel, wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_LIVE_RESIZE | wxAUI_MGR_HINT_FADE | wxAUI_MGR_VENETIAN_BLINDS_HINT ); m_mgr->SetArtProvider( new AUI::DockArt() ); #ifdef __WXDEBUG__ wxWindow *dbgWnd = (wxWindow *)m_handler->GetDebugWindow(m_panel); m_mgr->AddPane( dbgWnd, wxAuiPaneInfo().Bottom(). Name("DebugWindowPane").Caption(_("Logger") ). CloseButton(false).MinSize(-1,120).FloatingSize(300,120). LeftDockable(false).RightDockable(false) ); #endif wxWindow *palette = (wxWindow *)m_handler->GetPaletteBook(m_panel); wxWindow *treeView = (wxWindow *)m_handler->GetTreeView(m_panel); wxWindow *editor = (wxWindow *)m_handler->GetEditorBook(m_panel); wxWindow *propBook = (wxWindow *)m_handler->GetPropertyBook(m_panel); m_mgr->AddPane( palette, wxAuiPaneInfo().Top(). Name("ToolPalettePane").Caption(_("Controls") ). CloseButton(false).MinSize(-1,69).FloatingSize(300,69). LeftDockable(false).RightDockable(false).DockFixed(true). PaneBorder(false) ); m_mgr->AddPane( treeView, wxAuiPaneInfo().Left(). Name("TreeViewPane").Caption(_("Project") ). MaximizeButton(true).CloseButton(false). MinSize(180,-1).FloatingSize(150,300). TopDockable(false).BottomDockable(false) ); m_mgr->AddPane( editor, wxAuiPaneInfo().Center(). Name("EditorBookPane").Caption(_("Editor") ). MaximizeButton(true).CloseButton(false).DockFixed(true) ); m_mgr->AddPane( propBook, wxAuiPaneInfo().Right(). Name("BookPane").Caption(_("Properties") ). MaximizeButton(true).CloseButton(false). MinSize(180,-1).FloatingSize(150,300). TopDockable(false).BottomDockable(false) ); LoadLayout(); m_mgr->Update(); //============================================================================= // Events //============================================================================= Bind( wxEVT_CLOSE_WINDOW, &MainFrame::OnClose, this ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAbout, this, XRCID("wxID_ABOUT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnPreferences, this, XRCID("wxID_PREFERENCES") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnExit, this, XRCID("wxID_EXIT") ); //============================================================================= // Project //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnNewProject, this, XRCID("wxID_NEW") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnOpenProject, this, XRCID("wxID_OPEN") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnOpenRecent, this, XRCID("wxID_FILE1"), XRCID("wxID_FILE9") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnSaveAsProject, this, XRCID("wxID_SAVEAS") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnSaveProject, this, XRCID("wxID_SAVE") ); //============================================================================= // Undo/Redo //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnUndo, this, XRCID("wxID_UNDO") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnRedo, this, XRCID("wxID_REDO") ); //============================================================================= // Clipboard //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnCut, this, XRCID("wxID_CUT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnCopy, this, XRCID("wxID_COPY") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnPaste, this, XRCID("wxID_PASTE") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnDelete, this, XRCID("wxID_DELETE") ); //============================================================================= // CodeGenerator //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnGenerateCode, this, XRCID("wxID_EXECUTE") ); //============================================================================= // Widget's alignment //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignLeft, this, XRCID("ID_ALIGN_LEFT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignCenterH, this, XRCID("ID_ALIGN_CENTER_H") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignRight, this, XRCID("ID_ALIGN_RIGHT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignTop, this, XRCID("ID_ALIGN_TOP") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignCenterV, this, XRCID("ID_ALIGN_CENTER_V") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnAlignBottom, this, XRCID("ID_ALIGN_BOTTOM") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnExpand, this, XRCID("ID_EXPAND") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnStretch, this, XRCID("ID_STRETCH") ); //============================================================================= // Widget's borders //============================================================================= Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnBorderLeft, this, XRCID("ID_BORDER_LEFT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnBorderRight, this, XRCID("ID_BORDER_RIGHT") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnBorderTop, this, XRCID("ID_BORDER_TOP") ); Bind( wxEVT_COMMAND_TOOL_CLICKED, &MainFrame::OnBorderBottom, this, XRCID("ID_BORDER_BOTTOM") ); }
void PageActions::Update() { LoadLayout(GetCurrentLayout()); }
bool SettingsBtn::Load( const u8* setupBtnAshData, u32 setupBtnAshSize ) { if( loaded ) { return true; } if( !setupBtnAshData || !setupBtnAshSize ) { return false; } U8Archive arc( setupBtnAshData, setupBtnAshSize ); // create layout if( !(layout = LoadLayout( arc, "it_Button_a" ) ) ) { return false; } u32 x, y, w, h; // create objects and buttons ButtonCoords( Setup_Back, x, y, w, h ); btn = new QuadButton( x, y, w, h ); // load animations Animation *anim; #define LOADANIM( x, y ) \ do \ { \ if( !(anim = LoadAnimation( arc, y ) ) ) \ { \ return false; \ } \ brlans[ y ] = anim; \ x->AddAnimation( anim ); \ } \ while( 0 ) LOADANIM( cmnObj, "it_Button_a_AlphIn" ); LOADANIM( cmnObj, "it_Button_a_AlphOut" ); LOADANIM( btn, "it_Button_a_BtnFlash" ); LOADANIM( btn, "it_Button_a_BtnFoucusIn" ); LOADANIM( btn, "it_Button_a_BtnFoucusOut" ); LOADANIM( cmnObj, "it_Button_a_SeenIn" ); LOADANIM( wiiObj, "it_Button_a_WiiAppear" ); LOADANIM( wiiObj, "it_Button_a_WiiLost" ); // assign panes to objects cmnObj->BindGroup( layout->FindGroup( "G_BarIn" ) ); btn->BindGroup( layout->FindGroup( "G_SelectBtnA" ) ); wiiObj->BindGroup( layout->FindGroup( "G_Wii" ) ); // assign animations to objects cmnObj->SetAnimation( "it_Button_a_SeenIn", 0, -1, -1, false ); cmnObj->Start(); btn->SetMouseOverAnimation( brlans.find( "it_Button_a_BtnFoucusIn" )->second, 0, -1 ); btn->SetMouseOutAnimation( brlans.find( "it_Button_a_BtnFoucusOut" )->second, 0, -1 ); btn->SetClickAnimation( brlans.find( "it_Button_a_BtnFlash" )->second, 0, -1 ); btn->SetTrigger( Button::Btn_A ); btn->Clicked.connect( this, &SettingsBtn::BackBtnClicked ); btn->Finished.connect( this, &SettingsBtn::BackAnimDone ); SetText( layout, "T_Button_00", 252 );// "Back" loaded = true; return true; }