| 111 | } |
| 112 | |
| 113 | void SettingsActions::aboutEcode() { |
| 114 | String msg( ecode::Version::getVersionFullName() + " (codename: \"" + |
| 115 | ecode::Version::getCodename() + "\")" ); |
| 116 | UIMessageBox* msgBox = UIMessageBox::New( UIMessageBox::OK, msg ); |
| 117 | UIImage* image = UIImage::New(); |
| 118 | image->setParent( msgBox->getContainer()->getFirstChild() ); |
| 119 | auto tf = TextureFactory::instance(); |
| 120 | Texture* tex = tf->getByName( "ecode-logo" ); |
| 121 | if ( tex == nullptr ) { |
| 122 | tex = tf->loadFromFile( mApp->resPath() + "icon/ecode.png" ); |
| 123 | if ( tex ) |
| 124 | tex->setName( "ecode-logo" ); |
| 125 | } |
| 126 | image->setDrawable( tex ); |
| 127 | image->setLayoutGravity( UI_NODE_ALIGN_CENTER ); |
| 128 | image->setGravity( UI_NODE_ALIGN_CENTER ); |
| 129 | image->setScaleType( UIScaleType::FitInside ); |
| 130 | image->setLayoutSizePolicy( SizePolicy::Fixed, SizePolicy::Fixed ); |
| 131 | image->setSize( { 128, 128 } ); |
| 132 | image->toBack(); |
| 133 | msgBox->setTitle( i18n( "about_ecode", "About ecode..." ) ); |
| 134 | msgBox->setCloseShortcut( { KEY_ESCAPE, 0 } ); |
| 135 | msgBox->showWhenReady(); |
| 136 | } |
| 137 | |
| 138 | void SettingsActions::ecodeSource() { |
| 139 | Engine::instance()->openURI( "https://github.com/SpartanJ/ecode" ); |
no test coverage detected