Scenario editor: try to simplify the code used to draw terrain texture +

use cPictNum to retrieve the big terrain pictures...
This commit is contained in:
ALONSO Laurent
2021-10-16 16:06:12 +02:00
committed by Celtic Minstrel
parent 7e189847ee
commit cabe7beff1
8 changed files with 78 additions and 106 deletions

View File

@@ -368,7 +368,7 @@ void edit_sign(sign_loc_t& which_sign,short num,short picture) {
cDialog sign_dlg("edit-sign");
sign_dlg["cancel"].attachClickHandler(std::bind(&cDialog::toast, &sign_dlg, false));
sign_dlg["okay"].attachClickHandler(std::bind(edit_sign_event_filter, _1, std::ref(which_sign)));
dynamic_cast<cPict&>(sign_dlg["pic"]).setPict(cPictNum::getPN_for_terrain(picture));
dynamic_cast<cPict&>(sign_dlg["pic"]).setPict(cTerrain::get_picture_num_for_terrain(picture)); // checkme: does this really need to be some terrain?
sign_dlg["num"].setTextToNum(num);
sign_dlg["text"].setText(which_sign.text);