Esempio n. 1
0
FontId::FontId(const char* name, uint size /*= 12*/)
	:FileId(FileIdRef(name)),
	mSize(size),
	mColor(Color4F::Black),
	mBackgroundColor(Color4F::White),
	mOutlineColor(Color4F::Black),
	mUnderlineColor(Color4F::Black),
	mOverlineColor(Color4F::Black),
	mStrikethroughColor(Color4F::Black),
	mMatrix(Matrix2::Identity)
{
	mIsBitmap = IsBitmapFont(Name);
}
Esempio n. 2
0
bool ScrollComponentLayer::Initialize()
{
	RETURN_FALSE_IF_FALSE(BaseCaseLayer::Initialize());


	NormalLayer* normalLayer = new NormalLayer();
	float winWidth = ResolutionAdapter::Instance().WinWidth();
	float winHeight = ResolutionAdapter::Instance().WinHeight();

	FOR_EACH_UINT32(i, mChildCount)
	{
		Sprite* child = NodeFactory::Instance().CreateSprite(FileIdRef("Background.jpg", i));
		child->SetPositionX(winWidth*i);
		normalLayer->AddChild(child);
	}
Esempio n. 3
0
bool MaterialFactory::CreateTextures(SortedDictionary<uint, IMaterial*>& outMaterials, const StringRef& textureNamePattern)
{
	List<const FileMapOrderItem*> outOrderItems;
	if (!FileSystem::Instance().TryGetOrderItems(textureNamePattern, outOrderItems))
	{
		return false;
	}

	for (const FileMapOrderItem* orderItem : outOrderItems)
	{
		ITexture* texture = TextureFactory::Instance().CreateFromOrderItem(FileIdRef(textureNamePattern, orderItem->Order()), *orderItem, ShaderSamplerNames::Texture);
		IMaterial* material = CreateSingleTexture(texture);
		outMaterials.Add(orderItem->Order(),material);
	}

	return true;
}
Esempio n. 4
0
//const static MemoryFileAutoRegister mRegister_FntFont_fsh(FileIdRef("FntFont.fsh"),_FntFont_fsh);
static void Register_FntFont_fsh(){MemoryFileAutoRegister::Register(FileIdRef("FntFont.fsh"),_FntFont_fsh);}
Esempio n. 5
0
//const static MemoryFileAutoRegister mRegister_Label_TTF_Outline_fsh(FileIdRef("Label_TTF_Outline.fsh"),_Label_TTF_Outline_fsh);
static void Register_Label_TTF_Outline_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Label_TTF_Outline.fsh"),_Label_TTF_Outline_fsh);}
Esempio n. 6
0
bool StringTable::Add(const StringRef& name, uint order, const StringRef& val)
{
	return Add(FileIdRef(name, order), val);
}
Esempio n. 7
0
//const static MemoryFileAutoRegister mRegister_Shape_fsh(FileIdRef("Shape.fsh"),_Shape_fsh);
static void Register_Shape_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Shape.fsh"),_Shape_fsh);}
Esempio n. 8
0
//const static MemoryFileAutoRegister mRegister_POD_vsh(FileIdRef("POD.vsh"),_POD_vsh);
static void Register_POD_vsh(){MemoryFileAutoRegister::Register(FileIdRef("POD.vsh"),_POD_vsh);}
Esempio n. 9
0
//const static MemoryFileAutoRegister mRegister_Label_TTF_Text_fsh(FileIdRef("Label_TTF_Text.fsh"),_Label_TTF_Text_fsh);
static void Register_Label_TTF_Text_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Label_TTF_Text.fsh"),_Label_TTF_Text_fsh);}
Esempio n. 10
0
//const static MemoryFileAutoRegister mRegister_Color_fsh(FileIdRef("Color.fsh"),_Color_fsh);
static void Register_Color_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Color.fsh"),_Color_fsh);}