MCPcopy Create free account
hub / github.com/SpartanJ/eepp / aboutEcode

Method aboutEcode

src/tools/ecode/settingsactions.cpp:113–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void 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
138void SettingsActions::ecodeSource() {
139 Engine::instance()->openURI( "https://github.com/SpartanJ/ecode" );

Callers 1

Calls 15

setParentMethod · 0.80
getFirstChildMethod · 0.80
setLayoutGravityMethod · 0.80
setLayoutSizePolicyMethod · 0.80
toBackMethod · 0.80
showWhenReadyMethod · 0.80
NewFunction · 0.50
getContainerMethod · 0.45
getByNameMethod · 0.45
loadFromFileMethod · 0.45
setNameMethod · 0.45
setDrawableMethod · 0.45

Tested by

no test coverage detected