Mali GPU User Interface Engine Application Development Guide
Mali GPU User Interface Engine Application Development Guide
Mali GPU User Interface Engine Application Development Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Tutorial on the Lotion <strong>User</strong> <strong>Interface</strong> Classes}// FrameiconQuads[i*4+2]->set2DRectangle(vec2(i * 265.f+7.f, 96.f+ add_refl),vec2(258.f, 154.f), 0);iconQuads[i*4+2]->setTexture(0, getBitmap("themes/blue/frame.png"),BitmapComponentsRGB_PremultiplyAlpha);iconQuads[i*4+2]->setTexture(1, getBitmap("themes/blue/frame.png"),BitmapComponentsAAA);// Frame ReflectioniconQuads[i*4+3]->set2DRectangle(vec2(i * 265+7, 96+162*2+refl_dist+ add_refl),vec2(258, -154), 0);iconQuads[i*4+3]->setTexture(0, getBitmap("themes/blue/frame.png"),BitmapComponentsRGB_PremultiplyAlpha);iconQuads[i*4+3]->setTexture(1, getBitmap("themes/blue/frame.png"),BitmapComponentsAAA);}...// placing the reflection stopper into the text layerprintf("Blue: Loading reflection stopper\n");textLayer->createInstances(2, iconTextInstances);iconTextInstances[iconTextInstances.getSize()-1]->createQuads(2, true,iconQuads);Quad* refStopper = iconQuads[iconQuads.getSize()-2];refStopper->setTexture(0, getBitmap("themes/blue/reflection_stopper.png"),BitmapComponentsRGBA_PremultiplyAlpha);refStopper->set2DRectangle(vec2(0,0), getResolution(), 0);Quad* bottomBar = iconQuads[iconQuads.getSize()-1];bottomBar->setTexture(0, getBitmap("themes/blue/bottom_bar.png"),BitmapComponentsRGBA_PremultiplyAlpha);bottomBar->set2DRectangle(vec2(0,480-50), vec2(800,46), 0);currentApplet = 0;position = 0;velocity = 0;printf("Blue: Loading transitions\n");transition = new Transitions::Slime(get<strong>Application</strong>()->getProxy(), getResolution());printf("Blue: Init complete\n");5.5.3 Theme update methodsThe methods shown in Example 5-28 handle updates:Example 5-28 Theme update methods...void Blue::onUpdate(Widget* w){if (w != this) return;float time = get<strong>Application</strong>()->getTime();static float simTime = 0.0f;while (simTime < time){if (state == StateAppletRunning){velocity = 0;}ARM DUI 0527A-02a Copyright © 2010 ARM. All rights reserved. 5-34ID070710Non-Confidential - Draft - Beta