k9PlaybackOptions::k9PlaybackOptions(k9Main *mainWindow, QWidget* parent)
: QWidget(parent)
{
    Ui_playbackOptionsw.setupUi(this);
    setMain( mainWindow);
    m_main->setPlaybackOptions(this);
    enable(false);
    k9Config config;
    Ui_playbackOptionsw.ckMenu->setChecked(config.getKeepMenus());
    ckMenuClick();
  
}
Beispiel #2
0
 std::shared_ptr<Canvas> Scene::createCanvas(bool includeUICamera) {
     GameObject *gameObject = createGameObject("Canvas");
     auto canvas = gameObject->addComponent<Canvas>();
     if (includeUICamera){
         auto camera = createOrthographicCamera(gameObject);
         camera->setMain(false);
         camera->setIndex(1);
         camera->setCullingMask(256);//0b100000000
         camera->setClearColorBuffer(false);
         canvas->setCamera(camera);
     }
     return canvas;
 }
Beispiel #3
0
CustomScreen::CustomScreen(Screen *previous) : previous(previous) {
	mainLayout = createMainLayout("", "Back");
	listBox = (ListBox*) mainLayout->getChildren()[0];
	
	digClock = new Clock(0, 0, scrWidth-PADDING*2, 32, listBox, gFont);
	digClock->setType(Clock::DIGITAL);

	anaClock = new Clock(0, 0, scrWidth-PADDING*2, 128-32, listBox, 0);
	anaClock->setType(Clock::ANALOGUE);

	softKeys = mainLayout->getChildren()[1];

	setMain(mainLayout);
}
Beispiel #4
0
// Changes to the specified menu, calling this will pause all game actions until the player presses resume.
// This is also going to compile the menu, so everything should be controlled using this and the flag functions.
void Menu::setMenu(int menu){
	switch (menu){
	case TITLE:
		setTitle();
		break;
	case MAIN:
		setMain();
		break;
	case MINI:
		setMiniPause();
		break;
	case META:
		setMetaPause();
	}
}
NewMenuScreen::NewMenuScreen(Feed *feed) : mHttp(this), screenType(screenType) {
	lprintfln("NewMenuScreen::Memory Heap %d, Free Heap %d", heapTotalMemory(), heapFreeMemory());
	this->feed = feed;

	int itemCount = sizeof(menuItems)/sizeof(item);

	c=0;
	versionChecked=0;
	next = NULL;
	first = 1;

	mainLayout = new Layout(0, 0, scrWidth, scrHeight, NULL, 1, 2);

	MAExtent imgSize = maGetImageSize(RES_IMAGE);
	int imgHeight = EXTENT_Y(imgSize);

	ListBox *listBox = new ListBox(0, 0, scrWidth, scrHeight, mainLayout, ListBox::LBO_VERTICAL, ListBox::LBA_LINEAR, true);
	listBox->setSkin(Util::getSkinBack());
	/*listBox->setSkin(Util::getSkinHeader());*/
	/*listBox->setDrawBackground(false);*/


	/*Layout *header = new Layout(0,0,scrWidth, imgHeight, NULL, 1, 1);
	header->setSkin(Util::getSkinHeader());*/

	ListBox *header = new ListBox(0, 0, scrWidth, imgHeight, NULL, ListBox::LBO_VERTICAL, ListBox::LBA_LINEAR, true);
	header->setSkin(Util::getSkinHeader());

	Image *image = new Image(0, 0, scrWidth,  imgHeight, NULL, true, true, RES_IMAGE);
	header->add(image);

	listBox->add(header);

	label = new Label(0,0,scrWidth,36,NULL,"",0,Util::getDefaultSelected());
	label->setMultiLine(true);
	label->setAutoSizeY();
	label->setMultiLine(true);
	label->setDrawBackground(false);
	listBox->add(label);

	menu = new GCMenu(menuItems, itemCount, 0, 0, scrWidth, listBox->getHeight() - imgHeight, false, false, listBox);

	setMain(mainLayout);

	origMenu = this;
}
Beispiel #6
0
browserView::browserView (WidgetSkin * skin) : MainScreen (skin) {

	int height = 30;

	/*************** main layout **************************/
	Layout * main_layout    = new Layout (0, 0, scrWidth, scrHeight, NULL, 1, 2);


	/******************* list box ********************/
	this->list_box = new ListBox (0, 0, scrWidth, scrHeight - height,
								  main_layout, ListBox::LBO_VERTICAL, ListBox::LBA_LINEAR,
								  true);
	list_box->setPaddingLeft   (5);
	list_box->setPaddingRight  (5);
	list_box->setPaddingTop    (15);
	list_box->setPaddingBottom (15);
	list_box->setSkin		   (skin);

	setMain (main_layout);
}
Beispiel #7
0
	//-------------------------------------------------------------------------
	AppScreenBase::AppScreenBase( MobletEx* moblet ) :
	//-------------------------------------------------------------------------
		mMoblet( moblet ),
		mSoftKeyBar( NULL ),
		mContentFrame( NULL ),
		mAppFrame( NULL ),
		mMessagePosted( false ),
		mKeyTimer( NULL )
	{
		//
		// Screen size
		//
		MAExtent screenSize = maGetScrSize( );
		mWidth = EXTENT_X( screenSize );
		mHeight = EXTENT_Y( screenSize );
		//
		// Frame containing tab widgets
		//
		mContentFrame = newobject( Layout, new Layout( 0, 0, mWidth, mHeight - BottomHeight, NULL, 1, 1 ) );
		//
		// Bottom bar with soft key labels
		//
		mSoftKeyBar = newobject( SoftKeyBar, new SoftKeyBar( 0, 0, mWidth, BottomHeight, NULL ) );
		mSoftKeyBar->setLeftAction( newobject( ShowMenuAction, new ShowMenuAction( this ) ) );
		mSoftKeyBar->setRightAction( newobject( ExitAction, new ExitAction( mMoblet ) ) );

		AppStyle* style = AppStyleMgr::getStyle( );
		mAppFrame = newobject( AppFrame, new AppFrame( 0, 0, mWidth, mHeight,NULL, 1, 3 ) );

		mAppFrame->add( mContentFrame );
		mAppFrame->add( mSoftKeyBar );
		mAppFrame->setDrawBackground( false );
		mAppFrame->setfont( style->getFont( FontSize_Smallest, Color::white, false ) );
		mAppFrame->update( );

		setMain( mAppFrame );
		//
		// Listen to messages
		//
		MessageMgr::get( )->addListener( this );
	}