Exemple #1
0
PageWindow::PageWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_scroller_snap.tb.txt");

	// Listen to the pagers scroller
	if (TBWidget *pager = GetWidgetByID(TBIDC("page-scroller")))
		pager->GetScroller()->SetSnapListener(this);
}
Exemple #2
0
ListWindow::ListWindow(TBWidget *root, TBSelectItemSource *source) : DemoWindow(root)
{
	LoadResourceFile("Demo/demo01/ui_resources/test_select.tb.txt");
	if (TBSelectList *select = GetWidgetByIDAndType<TBSelectList>("list"))
	{
		select->SetSource(source);
		select->GetScrollContainer()->SetScrollMode(SCROLL_MODE_Y_AUTO);
	}
}
Exemple #3
0
ScrollContainerWindow::ScrollContainerWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_scrollcontainer.tb.txt");

	if (TBSelectDropdown *select = GetWidgetByIDAndType<TBSelectDropdown>(TBIDC("name dropdown")))
		select->SetSource(&name_source);

	if (TBSelectDropdown *select = GetWidgetByIDAndType<TBSelectDropdown>(TBIDC("advanced dropdown")))
		select->SetSource(&advanced_source);
}
AdvancedListWindow::AdvancedListWindow(AdvancedItemSource *source)
	: m_source(source)
{
	LoadResourceFile("Demo/demo01/ui_resources/test_select_advanced.tb.txt");
	if (TBSelectList *select = GetWidgetByIDAndType<TBSelectList>("list"))
	{
		select->SetSource(source);
		select->GetScrollContainer()->SetScrollMode(SCROLL_MODE_X_AUTO_Y_AUTO);
	}
}
bool CResourceMgr::AddResource( char* szFileName,int iModuleID )
{
	TABLE_MODULE_ITER	iterModule;
	iterModule = m_ResourceTable.find( iModuleID );
	if( iterModule != m_ResourceTable.end() )
	{
		char Buff[256];
		sprintf( Buff,"Duplicated Image Resource Module ID:[%d]",iModuleID );
		MessageBox(NULL,Buff,"Load Error",MB_OK);
		return false;
	}

	return LoadResourceFile( szFileName, iModuleID );	
}
Exemple #6
0
MeshWindow::MeshWindow(
	tb::TBWidget* root,
	std::shared_ptr<InstancedMesh> mesh) :
	Window(root),
	_mesh(mesh),
	_currentID(0)
{
	Log::Debug("[MeshWindow] constructor, instance at %p", this);
	std::string resourcePath = PathUtil::GUIPath() + "ui_meshwindow.txt";
	LoadResourceFile(resourcePath.c_str());

	m_close_button.SetState(tb::WIDGET_STATE_DISABLED, true);
	refreshInstances();
}
Exemple #7
0
AnimationsWindow::AnimationsWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_animations.tb.txt");
	Animate();
}
Exemple #8
0
ImageWindow::ImageWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_image_widget.tb.txt");
}
TabContainerWindow::TabContainerWindow(TBWidget *root) : DemoWindow(root)
{
	LoadResourceFile("demo01/ui_resources/test_tabcontainer01.tb.txt");
}
Exemple #10
0
ConnectionWindow::ConnectionWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_connections.tb.txt");
}
ConnectionWindow::ConnectionWindow(TBWidget *root) : DemoWindow(root)
{
	LoadResourceFile("demo01/ui_resources/test_connections.tb.txt");
}
Exemple #12
0
LayoutWindow::LayoutWindow(const char *filename)
{
	LoadResourceFile(filename);
}
Exemple #13
0
TabContainerWindow::TabContainerWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_tabcontainer01.tb.txt");
}
LayoutWindow::LayoutWindow(TBWidget *root, const char *filename) : DemoWindow(root)
{
	LoadResourceFile(filename);
}
Exemple #15
0
MainWindow::MainWindow()
{
	LoadResourceFile("Demo/demo01/ui_resources/test_ui.tb.txt");

	SetOpacity(0.97f);
}
ImageWindow::ImageWindow(TBWidget *root) : DemoWindow(root)
{
	LoadResourceFile("demo01/ui_resources/test_image_widget.tb.txt");
}
AnimationsWindow::AnimationsWindow(TBWidget *root) : DemoWindow(root)
{
	LoadResourceFile("demo01/ui_resources/test_animations.tb.txt");
	Animate();
}
// == MainWindow ==============================================================
MainWindow::MainWindow(TBWidget *root) : DemoWindow(root)
{
	LoadResourceFile("demo01/ui_resources/test_ui.tb.txt");

	SetOpacity(0.97f);
}
Exemple #19
0
	EditWindow()
	{
		LoadResourceFile("Demo/demo01/ui_resources/test_textwindow.tb.txt");
	}
// == EditWindow ==============================================================
EditWindow::EditWindow(TBWidget *root) : DemoWindow(root)
{
    LoadResourceFile("demo01/ui_resources/test_textwindow.tb.txt");
}