mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
pos from texture
This commit is contained in:
parent
cbd014ac88
commit
12ca3ea0ec
@ -49,9 +49,6 @@ CMapOverview::CMapOverview(std::string mapName, std::string fileName, std::strin
|
|||||||
|
|
||||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||||
|
|
||||||
const JsonNode config(JsonPath::builtin("config/widgets/mapOverview.json"));
|
|
||||||
pos = Rect(0, 0, config["items"][0]["rect"]["w"].Integer(), config["items"][0]["rect"]["h"].Integer());
|
|
||||||
|
|
||||||
widget = std::make_shared<CMapOverviewWidget>(*this);
|
widget = std::make_shared<CMapOverviewWidget>(*this);
|
||||||
|
|
||||||
updateShadow();
|
updateShadow();
|
||||||
@ -179,6 +176,10 @@ CMapOverviewWidget::CMapOverviewWidget(CMapOverview& parent):
|
|||||||
|
|
||||||
build(config);
|
build(config);
|
||||||
|
|
||||||
|
if(auto w = widget<CFilledTexture>("background"))
|
||||||
|
{
|
||||||
|
p.pos = w->pos;
|
||||||
|
}
|
||||||
if(auto w = widget<CTextBox>("fileName"))
|
if(auto w = widget<CTextBox>("fileName"))
|
||||||
{
|
{
|
||||||
w->setText(p.fileName);
|
w->setText(p.fileName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user