|
|
|
@ -735,7 +735,7 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
|
|
|
|
|
MaterialDescriptor material = get_material_in_list(ui_build_selector->sel_index);
|
|
|
|
|
if (material.valid)
|
|
|
|
|
{
|
|
|
|
|
if (input->count(interface_key::SELECT) || input->count(interface_key::SEC_SELECT))
|
|
|
|
|
if (input->count(interface_key::SELECT) || input->count(interface_key::SELECT_ALL))
|
|
|
|
|
{
|
|
|
|
|
if (get_last_moved_material().matches(material))
|
|
|
|
|
last_used_moved = false; //Keep selected material on top
|
|
|
|
@ -749,7 +749,7 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
|
|
|
|
|
gen_material.push_back(get_material_in_list(curr_index));
|
|
|
|
|
box_select_materials.clear();
|
|
|
|
|
// Populate material list with selected material
|
|
|
|
|
populate_box_materials(gen_material, ((input->count(interface_key::SEC_SELECT) && ui_build_selector->is_grouped) ? -1 : 1));
|
|
|
|
|
populate_box_materials(gen_material, ((input->count(interface_key::SELECT_ALL) && ui_build_selector->is_grouped) ? -1 : 1));
|
|
|
|
|
|
|
|
|
|
input->clear(); // Let the apply_box_selection routine allocate the construction
|
|
|
|
|
input->insert(interface_key::LEAVESCREEN);
|
|
|
|
@ -1162,6 +1162,15 @@ struct jobutils_hook : public df::viewscreen_dwarfmodest
|
|
|
|
|
|
|
|
|
|
case SELECT_SECOND:
|
|
|
|
|
OutputString(COLOR_GREEN, x, y, "Choose second corner", true, left_margin);
|
|
|
|
|
|
|
|
|
|
int32_t curr_x, curr_y, curr_z;
|
|
|
|
|
Gui::getCursorCoords(curr_x, curr_y, curr_z);
|
|
|
|
|
int dX = abs(box_first.x - curr_x) + 1;
|
|
|
|
|
int dY = abs(box_first.y - curr_y) + 1;
|
|
|
|
|
stringstream label;
|
|
|
|
|
label << "Selection: " << dX << "x" << dY;
|
|
|
|
|
OutputString(COLOR_WHITE, x, ++y, label.str(), true, left_margin);
|
|
|
|
|
|
|
|
|
|
int cx = box_first.x;
|
|
|
|
|
int cy = box_first.y;
|
|
|
|
|
OutputString(COLOR_BROWN, cx, cy, "X");
|
|
|
|
|