本文整理汇总了C++中KeyValue::GetString方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyValue::GetString方法的具体用法?C++ KeyValue::GetString怎么用?C++ KeyValue::GetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyValue
的用法示例。
在下文中一共展示了KeyValue::GetString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: window
TextureSystem::TextureSystem(sf::RenderWindow& rw, entityx::EntityManager& entities, KeyValue& keys)
: window(rw)
, imageRenderEnabled(false)
, randomTexturesEnabled(true)
, positionTextEnabled(false)
, entities(entities)
{
/* This doesn't change. It maps the type shape to the vector of textures aviliable
* under random texturing, or we use the first for no random textures */
texturemap = {
{ SpawnComponent::BOX, {&boxTextures, conf::box_halfwidth*2}},
{ SpawnComponent::CIRCLE, {&ballTextures, conf::circle_radius*2}}
};
/* Textures for physics objects
* `loadTextures` reads a key from an .ini consisting of colon-delimited
* textures, and loads them into a vector */
loadTextures(boxTextures, keys.GetString("BOX_TEXTURES"));
loadTextures(ballTextures, keys.GetString("BALL_TEXTURES"));
//Load background texture and make it repeating
bgTexture.loadFromFile(keys.GetString("BACKGROUND_TEXTURE"));
bgTexture.setRepeated(true);
bgSprite.setTexture(bgTexture);
auto windsz = rw.getSize();
bgSprite.setTextureRect(sf::IntRect(0, 0, windsz.x, windsz.y));
//Font for displaying positions and other things
boxFont.loadFromFile(keys.GetString("OBJECT_FONT"));
}