Пример #1
0
 HelpPage()
 {
     Box *vbox = new VBox();
     ScrollArea* scroll = new ScrollArea();
     scroll->fitToParent(true);
     RichText *text = new RichText(help_text_html, help_text_html_len);
     scroll->virtualSize(Vec2(SCREEN_WIDTH,text->layout(SCREEN_WIDTH)));
     text->fitToParent(true);
     text->alpha(100);
     scroll->add(text,0,0);
     vbox->add( scroll, 0, 1 );
     vbox->add( new Button(PROJECT_HOMEPAGE,Event::SELECT), 36, 0 );
     m_content->add(vbox,0,0);
 }
Пример #2
0
 HelpPage()
 {
   Box *vbox = new VBox();
   ScrollArea* scroll = new ScrollArea();
   scroll->fitToParent(true);
   RichText *text = new RichText(HELP_TEXT);
   scroll->virtualSize(Vec2(SCREEN_WIDTH,text->layout(SCREEN_WIDTH)));
   text->fitToParent(true);
   text->alpha(100);
   scroll->add(text,0,0);
   vbox->add( scroll, 0, 1 );
   vbox->add( new Button("http://numptyphysics.garage.maemo.org",Event::SELECT), 36, 0 );
   m_content->add(vbox,0,0);
 }
Пример #3
0
    LevelSelector(GameControl* game, int initialLevel)
        : m_game(game),
          m_levels(game->m_levels),
          m_collection(0),
          m_dispbase(0),
          m_dispcount(0)
    {
        m_scroll = new ScrollArea();
        m_scroll->fitToParent(true);
        m_scroll->virtualSize(Vec2(SCREEN_WIDTH,SCREEN_HEIGHT));

        m_content->add(m_scroll,0,0);
        fitToParent(true);

        int levelInC;
        m_collection = m_levels->collectionFromLevel(initialLevel,&levelInC);
        setCollection(m_collection, levelInC);
    }