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); }
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); }
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; }
//const static MemoryFileAutoRegister mRegister_FntFont_fsh(FileIdRef("FntFont.fsh"),_FntFont_fsh); static void Register_FntFont_fsh(){MemoryFileAutoRegister::Register(FileIdRef("FntFont.fsh"),_FntFont_fsh);}
//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);}
bool StringTable::Add(const StringRef& name, uint order, const StringRef& val) { return Add(FileIdRef(name, order), val); }
//const static MemoryFileAutoRegister mRegister_Shape_fsh(FileIdRef("Shape.fsh"),_Shape_fsh); static void Register_Shape_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Shape.fsh"),_Shape_fsh);}
//const static MemoryFileAutoRegister mRegister_POD_vsh(FileIdRef("POD.vsh"),_POD_vsh); static void Register_POD_vsh(){MemoryFileAutoRegister::Register(FileIdRef("POD.vsh"),_POD_vsh);}
//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);}
//const static MemoryFileAutoRegister mRegister_Color_fsh(FileIdRef("Color.fsh"),_Color_fsh); static void Register_Color_fsh(){MemoryFileAutoRegister::Register(FileIdRef("Color.fsh"),_Color_fsh);}