Put the unit group icons into use.
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -55,31 +55,24 @@ void unit_palette::setup(const config& /*cfg*/)
|
|||||||
config cfg;
|
config cfg;
|
||||||
cfg["id"] = i.second.id();
|
cfg["id"] = i.second.id();
|
||||||
cfg["name"] = i.second.plural_name();
|
cfg["name"] = i.second.plural_name();
|
||||||
//TODO
|
cfg["icon"] = "icons/unit-groups/race_" + i.second.id();
|
||||||
std::string& tmp = group_map_[i.second.id()][0];
|
|
||||||
cfg["icon"] = item_map_.find(tmp)->second.image();
|
|
||||||
cfg["core"] = "yes";
|
cfg["core"] = "yes";
|
||||||
groups_.push_back(item_group(cfg));
|
groups_.push_back(item_group(cfg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO
|
//TODO
|
||||||
//move "invalid" items to the end
|
//move "invalid" items to the end
|
||||||
//std::stable_partition(items.begin(), items.end(), is_valid_terrain);
|
//std::stable_partition(items.begin(), items.end(), is_valid_terrain);
|
||||||
|
|
||||||
// Set the default group
|
|
||||||
|
|
||||||
select_fg_item("Elvish Fighter");
|
select_fg_item("Elvish Fighter");
|
||||||
select_bg_item("Elvish Archer");
|
select_bg_item("Elvish Archer");
|
||||||
|
|
||||||
|
// Set the default group
|
||||||
set_group("human");
|
set_group("human");
|
||||||
|
|
||||||
if(active_group().empty()) {
|
if(active_group().empty()) {
|
||||||
ERR_ED << "No items found.\n";
|
ERR_ED << "No items found.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO
|
|
||||||
// update_report();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void unit_palette::draw_item(const unit_type& u, surface& image, std::stringstream& tooltip_text) {
|
void unit_palette::draw_item(const unit_type& u, surface& image, std::stringstream& tooltip_text) {
|
||||||
|