Some minor fixes and improvements.

Added verbose layout loading to get more info about the performance when loading layouts.
This commit is contained in:
Martín Lucas Golini
2020-04-18 19:45:29 -03:00
parent fa20d393cd
commit 02433b13d3
35 changed files with 304 additions and 160 deletions

View File

@@ -104,6 +104,8 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
UITheme* theme =
UITheme::load( "uitheme" + pd, "uitheme" + pd, "assets/ui/uitheme" + pd + ".eta",
font, "assets/ui/uitheme.css" );
/*UITheme* theme =
UITheme::load( "uitheme", "uitheme", "", font, "assets/ui/breeze.css" );*/
uiSceneNode->combineStyleSheet( theme->getStyleSheet() );

View File

@@ -767,6 +767,13 @@ void mainLoop() {
uiSceneNode->setDrawDebugData( !uiSceneNode->getDrawDebugData() );
}
if ( window->getInput()->isKeyUp( KEY_F9 ) ) {
Clock clock;
uiSceneNode->getRoot()->reportStyleStateChangeRecursive();
eePRINTL( "Applied style state changes in: %.2fms",
clock.getElapsedTime().asMilliseconds() );
}
if ( mousePos != window->getInput()->getMousePos() ) {
mousePos = window->getInput()->getMousePos();
mouseClock.restart();
@@ -967,6 +974,9 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
preserveContainerSize = true;
}
Log::instance()->setLiveWrite( true );
Log::instance()->setConsoleOutput( true );
window = Engine::instance()->createWindow(
WindowSettings( 1280, 720, "eepp - UI Editor", WindowStyle::Default, WindowBackend::Default,
32, "assets/icon/ee.png", pixelDensity ),
@@ -995,6 +1005,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
uiSceneNode = UISceneNode::New();
uiSceneNode->setId( "uiSceneNode" );
uiSceneNode->setVerbose( true );
SceneManager::instance()->add( uiSceneNode );
appUiSceneNode = UISceneNode::New();