mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -32,7 +32,7 @@
|
||||
"vcmi.bonusSource.creature" : "Ability",
|
||||
"vcmi.bonusSource.spell" : "Spell",
|
||||
"vcmi.bonusSource.hero" : "Hero",
|
||||
"vcmi.bonusSource.commander" : "Commander",
|
||||
"vcmi.bonusSource.commander" : "Command.",
|
||||
"vcmi.bonusSource.other" : "Other",
|
||||
|
||||
"vcmi.capitalColors.0" : "Red",
|
||||
|
@@ -30,7 +30,7 @@
|
||||
"vcmi.bonusSource.creature" : "Fähigkeit",
|
||||
"vcmi.bonusSource.spell" : "Zauber",
|
||||
"vcmi.bonusSource.hero" : "Held",
|
||||
"vcmi.bonusSource.commander" : "Commander",
|
||||
"vcmi.bonusSource.commander" : "Command.",
|
||||
"vcmi.bonusSource.other" : "Anderes",
|
||||
|
||||
"vcmi.capitalColors.0" : "Rot",
|
||||
|
@@ -74,9 +74,12 @@ bool FontChain::bitmapFontsPrioritized(const std::string & bitmapFontName) const
|
||||
return true; // else - use original bitmap fonts
|
||||
}
|
||||
|
||||
void FontChain::addTrueTypeFont(const JsonNode & trueTypeConfig)
|
||||
void FontChain::addTrueTypeFont(const JsonNode & trueTypeConfig, bool begin)
|
||||
{
|
||||
chain.insert(chain.begin(), std::make_unique<CTrueTypeFont>(trueTypeConfig));
|
||||
if(begin)
|
||||
chain.insert(chain.begin(), std::make_unique<CTrueTypeFont>(trueTypeConfig));
|
||||
else
|
||||
chain.push_back(std::make_unique<CTrueTypeFont>(trueTypeConfig));
|
||||
}
|
||||
|
||||
void FontChain::addBitmapFont(const std::string & bitmapFilename)
|
||||
|
@@ -33,7 +33,7 @@ class FontChain final : public IFont
|
||||
public:
|
||||
FontChain() = default;
|
||||
|
||||
void addTrueTypeFont(const JsonNode & trueTypeConfig);
|
||||
void addTrueTypeFont(const JsonNode & trueTypeConfig, bool begin);
|
||||
void addBitmapFont(const std::string & bitmapFilename);
|
||||
|
||||
size_t getLineHeightScaled() const override;
|
||||
|
@@ -494,7 +494,7 @@ std::shared_ptr<const IFont> RenderHandler::loadFont(EFonts font)
|
||||
|
||||
bitmapPath = bmpConf[index].String();
|
||||
if (!ttfConf[bitmapPath].isNull())
|
||||
loadedFont->addTrueTypeFont(ttfConf[bitmapPath]);
|
||||
loadedFont->addTrueTypeFont(ttfConf[bitmapPath], !config["lowPriority"].Bool());
|
||||
}
|
||||
loadedFont->addBitmapFont(bitmapPath);
|
||||
|
||||
|
@@ -550,6 +550,15 @@ CreatureTooltip::CreatureTooltip(Point pos, const CGCreature * creature)
|
||||
tooltipTextbox = std::make_shared<CTextBox>(textContent, Rect(15, 95, 230, 150), 0, FONT_SMALL, ETextAlignment::TOPCENTER, Colors::WHITE);
|
||||
}
|
||||
|
||||
void CreatureTooltip::show(Canvas & to)
|
||||
{
|
||||
// fixes scrolling of textbox (#5076)
|
||||
setRedrawParent(true);
|
||||
redraw();
|
||||
|
||||
CIntObject::show(to);
|
||||
}
|
||||
|
||||
void MoraleLuckBox::set(const AFactionMember * node)
|
||||
{
|
||||
OBJECT_CONSTRUCTION;
|
||||
@@ -615,9 +624,9 @@ void MoraleLuckBox::set(const AFactionMember * node)
|
||||
imageName = morale ? "IMRL42" : "ILCK42";
|
||||
|
||||
image = std::make_shared<CAnimImage>(AnimationPath::builtin(imageName), *component.value + 3);
|
||||
image->moveBy(Point(pos.w/2 - image->pos.w/2, pos.h/2 - image->pos.h/2));//center icon
|
||||
image->moveBy(Point(pos.w/2 - image->pos.w/2, pos.h/2 - image->pos.h/2)); //center icon
|
||||
if(settings["general"]["enableUiEnhancements"].Bool())
|
||||
label = std::make_shared<CLabel>(small ? 30 : 42, small ? 20 : 38, EFonts::FONT_TINY, ETextAlignment::BOTTOMRIGHT, Colors::WHITE, std::to_string(modifierList->totalValue()));
|
||||
label = std::make_shared<CLabel>((image->pos.topLeft() - pos.topLeft()).x + (small ? 28 : 40), (image->pos.topLeft() - pos.topLeft()).y + (small ? 20 : 38), EFonts::FONT_TINY, ETextAlignment::BOTTOMRIGHT, Colors::WHITE, std::to_string(modifierList->totalValue()));
|
||||
}
|
||||
|
||||
MoraleLuckBox::MoraleLuckBox(bool Morale, const Rect &r, bool Small)
|
||||
|
@@ -166,6 +166,7 @@ class CreatureTooltip : public CIntObject
|
||||
std::shared_ptr<CAnimImage> creatureImage;
|
||||
std::shared_ptr<CTextBox> tooltipTextbox;
|
||||
|
||||
void show(Canvas & to) override;
|
||||
public:
|
||||
CreatureTooltip(Point pos, const CGCreature * creature);
|
||||
};
|
||||
|
@@ -668,7 +668,7 @@ CStackWindow::MainSection::MainSection(CStackWindow * owner, int yOffset, bool s
|
||||
expArea->text = parent->generateStackExpDescription();
|
||||
}
|
||||
expLabel = std::make_shared<CLabel>(
|
||||
pos.x + 21, pos.y + 52, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE,
|
||||
pos.x + 21, pos.y + 55, FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE,
|
||||
TextOperations::formatMetric(stack->experience, 6));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user