|
|
@ -233,261 +233,261 @@ command_result SetPauseState(color_ostream &stream, const SingleBool *in)
|
|
|
|
|
|
|
|
|
|
|
|
void CopyBuildMenu(DwarfControl::SidebarState * out)
|
|
|
|
void CopyBuildMenu(DwarfControl::SidebarState * out)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto menus = df::global::ui_sidebar_menus;
|
|
|
|
//auto menus = df::global::ui_sidebar_menus;
|
|
|
|
auto build_selector = df::global::ui_build_selector;
|
|
|
|
//auto build_selector = df::global::ui_build_selector;
|
|
|
|
if (build_selector->building_type == -1)
|
|
|
|
//if (build_selector->building_type == -1)
|
|
|
|
for (size_t i = 0; i < menus->building.choices_visible.size(); i++)
|
|
|
|
// for (size_t i = 0; i < menus->building.choices_visible.size(); i++)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
auto menu_item = menus->building.choices_visible[i];
|
|
|
|
// auto menu_item = menus->building.choices_visible[i];
|
|
|
|
auto send_item = out->add_menu_items();
|
|
|
|
// auto send_item = out->add_menu_items();
|
|
|
|
STRICT_VIRTUAL_CAST_VAR(building, df::interface_button_construction_building_selectorst, menu_item);
|
|
|
|
// STRICT_VIRTUAL_CAST_VAR(building, df::interface_button_construction_building_selectorst, menu_item);
|
|
|
|
if (building)
|
|
|
|
// if (building)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
auto send_bld = send_item->mutable_building_type();
|
|
|
|
// auto send_bld = send_item->mutable_building_type();
|
|
|
|
send_bld->set_building_type(building->building_type);
|
|
|
|
// send_bld->set_building_type(building->building_type);
|
|
|
|
send_bld->set_building_subtype(building->building_subtype);
|
|
|
|
// send_bld->set_building_subtype(building->building_subtype);
|
|
|
|
send_bld->set_building_custom(building->custom_type);
|
|
|
|
// send_bld->set_building_custom(building->custom_type);
|
|
|
|
send_item->set_existing_count(building->existing_count);
|
|
|
|
// send_item->set_existing_count(building->existing_count);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
STRICT_VIRTUAL_CAST_VAR(sub_category, df::interface_button_construction_category_selectorst, menu_item);
|
|
|
|
// STRICT_VIRTUAL_CAST_VAR(sub_category, df::interface_button_construction_category_selectorst, menu_item);
|
|
|
|
if (sub_category)
|
|
|
|
// if (sub_category)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
send_item->set_build_category((DwarfControl::BuildCategory)sub_category->category_id);
|
|
|
|
// send_item->set_build_category((DwarfControl::BuildCategory)sub_category->category_id);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
else
|
|
|
|
//else
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
auto send_selector = out->mutable_build_selector();
|
|
|
|
// auto send_selector = out->mutable_build_selector();
|
|
|
|
auto send_bld = send_selector->mutable_building_type();
|
|
|
|
// auto send_bld = send_selector->mutable_building_type();
|
|
|
|
send_bld->set_building_type(build_selector->building_type);
|
|
|
|
// send_bld->set_building_type(build_selector->building_type);
|
|
|
|
send_bld->set_building_subtype(build_selector->building_subtype);
|
|
|
|
// send_bld->set_building_subtype(build_selector->building_subtype);
|
|
|
|
send_bld->set_building_custom(build_selector->custom_type);
|
|
|
|
// send_bld->set_building_custom(build_selector->custom_type);
|
|
|
|
send_selector->set_stage((DwarfControl::BuildSelectorStage)build_selector->stage);
|
|
|
|
// send_selector->set_stage((DwarfControl::BuildSelectorStage)build_selector->stage);
|
|
|
|
for (size_t i = 0; i < build_selector->errors.size(); i++)
|
|
|
|
// for (size_t i = 0; i < build_selector->errors.size(); i++)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
if (build_selector->errors[i])
|
|
|
|
// if (build_selector->errors[i])
|
|
|
|
send_selector->add_errors(*build_selector->errors[i]);
|
|
|
|
// send_selector->add_errors(*build_selector->errors[i]);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
for (size_t i = 0; i < build_selector->choices.size(); i++)
|
|
|
|
// for (size_t i = 0; i < build_selector->choices.size(); i++)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
auto choice = build_selector->choices[i];
|
|
|
|
// auto choice = build_selector->choices[i];
|
|
|
|
auto send_choice = send_selector->add_choices();
|
|
|
|
// auto send_choice = send_selector->add_choices();
|
|
|
|
send_choice->set_distance(choice->distance);
|
|
|
|
// send_choice->set_distance(choice->distance);
|
|
|
|
std::string name;
|
|
|
|
// std::string name;
|
|
|
|
choice->getName(&name);
|
|
|
|
// choice->getName(&name);
|
|
|
|
send_choice->set_name(name);
|
|
|
|
// send_choice->set_name(name);
|
|
|
|
send_choice->set_num_candidates(choice->getNumCandidates());
|
|
|
|
// send_choice->set_num_candidates(choice->getNumCandidates());
|
|
|
|
send_choice->set_used_count(choice->getUsedCount());
|
|
|
|
// send_choice->set_used_count(choice->getUsedCount());
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
int16_t x_low, y_low, x_high, y_high;
|
|
|
|
// int16_t x_low, y_low, x_high, y_high;
|
|
|
|
GetBuildingSize(build_selector->building_type, build_selector->building_subtype, build_selector->custom_type, x_low, y_low, x_high, y_high);
|
|
|
|
// GetBuildingSize(build_selector->building_type, build_selector->building_subtype, build_selector->custom_type, x_low, y_low, x_high, y_high);
|
|
|
|
send_selector->set_radius_x_low(x_low);
|
|
|
|
// send_selector->set_radius_x_low(x_low);
|
|
|
|
send_selector->set_radius_y_low(y_low);
|
|
|
|
// send_selector->set_radius_y_low(y_low);
|
|
|
|
send_selector->set_radius_x_high(x_high);
|
|
|
|
// send_selector->set_radius_x_high(x_high);
|
|
|
|
send_selector->set_radius_y_high(y_high);
|
|
|
|
// send_selector->set_radius_y_high(y_high);
|
|
|
|
if (build_selector->stage >= 1)
|
|
|
|
// if (build_selector->stage >= 1)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
auto send_cursor = send_selector->mutable_cursor();
|
|
|
|
// auto send_cursor = send_selector->mutable_cursor();
|
|
|
|
send_cursor->set_x(cursor->x);
|
|
|
|
// send_cursor->set_x(cursor->x);
|
|
|
|
send_cursor->set_y(cursor->y);
|
|
|
|
// send_cursor->set_y(cursor->y);
|
|
|
|
send_cursor->set_z(cursor->z);
|
|
|
|
// send_cursor->set_z(cursor->z);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
for (int y = 0; y < (y_low + y_high + 1); y++)
|
|
|
|
// for (int y = 0; y < (y_low + y_high + 1); y++)
|
|
|
|
for (int x = 0; x < (x_low + x_high + 1); x++)
|
|
|
|
// for (int x = 0; x < (x_low + x_high + 1); x++)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
send_selector->add_tiles(build_selector->tiles[x][y]);
|
|
|
|
// send_selector->add_tiles(build_selector->tiles[x][y]);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
command_result GetSideMenu(DFHack::color_ostream &stream, const dfproto::EmptyMessage *in, DwarfControl::SidebarState *out)
|
|
|
|
command_result GetSideMenu(DFHack::color_ostream &stream, const dfproto::EmptyMessage *in, DwarfControl::SidebarState *out)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto ui = df::global::ui;
|
|
|
|
//auto ui = df::global::ui;
|
|
|
|
out->set_mode((proto::enums::ui_sidebar_mode::ui_sidebar_mode)ui->main.mode);
|
|
|
|
//out->set_mode((proto::enums::ui_sidebar_mode::ui_sidebar_mode)ui->main.mode);
|
|
|
|
auto mode = ui->main.mode;
|
|
|
|
//auto mode = ui->main.mode;
|
|
|
|
switch (mode)
|
|
|
|
//switch (mode)
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
case ui_sidebar_mode::Default:
|
|
|
|
//case ui_sidebar_mode::Default:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Squads:
|
|
|
|
//case ui_sidebar_mode::Squads:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateMine:
|
|
|
|
//case ui_sidebar_mode::DesignateMine:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateRemoveRamps:
|
|
|
|
//case ui_sidebar_mode::DesignateRemoveRamps:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateUpStair:
|
|
|
|
//case ui_sidebar_mode::DesignateUpStair:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateDownStair:
|
|
|
|
//case ui_sidebar_mode::DesignateDownStair:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateUpDownStair:
|
|
|
|
//case ui_sidebar_mode::DesignateUpDownStair:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateUpRamp:
|
|
|
|
//case ui_sidebar_mode::DesignateUpRamp:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateChannel:
|
|
|
|
//case ui_sidebar_mode::DesignateChannel:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateGatherPlants:
|
|
|
|
//case ui_sidebar_mode::DesignateGatherPlants:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateRemoveDesignation:
|
|
|
|
//case ui_sidebar_mode::DesignateRemoveDesignation:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateSmooth:
|
|
|
|
//case ui_sidebar_mode::DesignateSmooth:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateCarveTrack:
|
|
|
|
//case ui_sidebar_mode::DesignateCarveTrack:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateEngrave:
|
|
|
|
//case ui_sidebar_mode::DesignateEngrave:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateCarveFortification:
|
|
|
|
//case ui_sidebar_mode::DesignateCarveFortification:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Stockpiles:
|
|
|
|
//case ui_sidebar_mode::Stockpiles:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Build:
|
|
|
|
//case ui_sidebar_mode::Build:
|
|
|
|
CopyBuildMenu(out);
|
|
|
|
// CopyBuildMenu(out);
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::QueryBuilding:
|
|
|
|
//case ui_sidebar_mode::QueryBuilding:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Orders:
|
|
|
|
//case ui_sidebar_mode::Orders:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::OrdersForbid:
|
|
|
|
//case ui_sidebar_mode::OrdersForbid:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::OrdersRefuse:
|
|
|
|
//case ui_sidebar_mode::OrdersRefuse:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::OrdersWorkshop:
|
|
|
|
//case ui_sidebar_mode::OrdersWorkshop:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::OrdersZone:
|
|
|
|
//case ui_sidebar_mode::OrdersZone:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::BuildingItems:
|
|
|
|
//case ui_sidebar_mode::BuildingItems:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ViewUnits:
|
|
|
|
//case ui_sidebar_mode::ViewUnits:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::LookAround:
|
|
|
|
//case ui_sidebar_mode::LookAround:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsClaim:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsClaim:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsForbid:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsForbid:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsMelt:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsMelt:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsUnmelt:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsUnmelt:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsDump:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsDump:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsUndump:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsUndump:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsHide:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsHide:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateItemsUnhide:
|
|
|
|
//case ui_sidebar_mode::DesignateItemsUnhide:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateChopTrees:
|
|
|
|
//case ui_sidebar_mode::DesignateChopTrees:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateToggleEngravings:
|
|
|
|
//case ui_sidebar_mode::DesignateToggleEngravings:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateToggleMarker:
|
|
|
|
//case ui_sidebar_mode::DesignateToggleMarker:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Hotkeys:
|
|
|
|
//case ui_sidebar_mode::Hotkeys:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateTrafficHigh:
|
|
|
|
//case ui_sidebar_mode::DesignateTrafficHigh:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateTrafficNormal:
|
|
|
|
//case ui_sidebar_mode::DesignateTrafficNormal:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateTrafficLow:
|
|
|
|
//case ui_sidebar_mode::DesignateTrafficLow:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateTrafficRestricted:
|
|
|
|
//case ui_sidebar_mode::DesignateTrafficRestricted:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Zones:
|
|
|
|
//case ui_sidebar_mode::Zones:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ZonesPenInfo:
|
|
|
|
//case ui_sidebar_mode::ZonesPenInfo:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ZonesPitInfo:
|
|
|
|
//case ui_sidebar_mode::ZonesPitInfo:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ZonesHospitalInfo:
|
|
|
|
//case ui_sidebar_mode::ZonesHospitalInfo:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ZonesGatherInfo:
|
|
|
|
//case ui_sidebar_mode::ZonesGatherInfo:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DesignateRemoveConstruction:
|
|
|
|
//case ui_sidebar_mode::DesignateRemoveConstruction:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::DepotAccess:
|
|
|
|
//case ui_sidebar_mode::DepotAccess:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::NotesPoints:
|
|
|
|
//case ui_sidebar_mode::NotesPoints:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::NotesRoutes:
|
|
|
|
//case ui_sidebar_mode::NotesRoutes:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Burrows:
|
|
|
|
//case ui_sidebar_mode::Burrows:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::Hauling:
|
|
|
|
//case ui_sidebar_mode::Hauling:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ArenaWeather:
|
|
|
|
//case ui_sidebar_mode::ArenaWeather:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case ui_sidebar_mode::ArenaTrees:
|
|
|
|
//case ui_sidebar_mode::ArenaTrees:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
default:
|
|
|
|
//default:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
return CR_OK;
|
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
command_result SetSideMenu(DFHack::color_ostream &stream, const DwarfControl::SidebarCommand *in)
|
|
|
|
command_result SetSideMenu(DFHack::color_ostream &stream, const DwarfControl::SidebarCommand *in)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto ui = df::global::ui;
|
|
|
|
//auto ui = df::global::ui;
|
|
|
|
if (in->has_mode())
|
|
|
|
//if (in->has_mode())
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
ui_sidebar_mode::ui_sidebar_mode set_mode = (ui_sidebar_mode::ui_sidebar_mode)in->mode();
|
|
|
|
// ui_sidebar_mode::ui_sidebar_mode set_mode = (ui_sidebar_mode::ui_sidebar_mode)in->mode();
|
|
|
|
if (ui->main.mode != set_mode)
|
|
|
|
// if (ui->main.mode != set_mode)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
ui->main.mode = ui_sidebar_mode::Default;
|
|
|
|
// ui->main.mode = ui_sidebar_mode::Default;
|
|
|
|
switch (set_mode)
|
|
|
|
// switch (set_mode)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
case ui_sidebar_mode::Build:
|
|
|
|
// case ui_sidebar_mode::Build:
|
|
|
|
keyQueue.push(interface_key::D_BUILDING);
|
|
|
|
// keyQueue.push(interface_key::D_BUILDING);
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
default:
|
|
|
|
// default:
|
|
|
|
ui->main.mode = set_mode;
|
|
|
|
// ui->main.mode = set_mode;
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
switch (ui->main.mode)
|
|
|
|
//switch (ui->main.mode)
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
case ui_sidebar_mode::Build:
|
|
|
|
//case ui_sidebar_mode::Build:
|
|
|
|
if (in->has_action())
|
|
|
|
// if (in->has_action())
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
int index = 0;
|
|
|
|
// int index = 0;
|
|
|
|
if (in->has_menu_index())
|
|
|
|
// if (in->has_menu_index())
|
|
|
|
index = in->menu_index();
|
|
|
|
// index = in->menu_index();
|
|
|
|
if(ui_build_selector->building_type == -1)
|
|
|
|
// if(ui_build_selector->building_type == -1)
|
|
|
|
df::global::ui_sidebar_menus->building.cursor = index;
|
|
|
|
// df::global::ui_sidebar_menus->building.cursor = index;
|
|
|
|
if (ui_build_selector->stage == 2)
|
|
|
|
// if (ui_build_selector->stage == 2)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
ui_build_selector->sel_index = index;
|
|
|
|
// ui_build_selector->sel_index = index;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
if (ui_build_selector->stage == 1)
|
|
|
|
// if (ui_build_selector->stage == 1)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
if (in->has_selection_coord())
|
|
|
|
// if (in->has_selection_coord())
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
df::global::cursor->x = in->selection_coord().x();
|
|
|
|
// df::global::cursor->x = in->selection_coord().x();
|
|
|
|
df::global::cursor->y = in->selection_coord().y();
|
|
|
|
// df::global::cursor->y = in->selection_coord().y();
|
|
|
|
df::global::cursor->z = in->selection_coord().z();
|
|
|
|
// df::global::cursor->z = in->selection_coord().z();
|
|
|
|
getCurViewscreen()->feed_key(interface_key::CURSOR_LEFT);
|
|
|
|
// getCurViewscreen()->feed_key(interface_key::CURSOR_LEFT);
|
|
|
|
getCurViewscreen()->feed_key(interface_key::CURSOR_RIGHT);
|
|
|
|
// getCurViewscreen()->feed_key(interface_key::CURSOR_RIGHT);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
default:
|
|
|
|
//default:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
if (in->has_action())
|
|
|
|
//if (in->has_action())
|
|
|
|
{
|
|
|
|
//{
|
|
|
|
switch (in->action())
|
|
|
|
// switch (in->action())
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
case DwarfControl::MenuSelect:
|
|
|
|
// case DwarfControl::MenuSelect:
|
|
|
|
keyQueue.push(interface_key::SELECT);
|
|
|
|
// keyQueue.push(interface_key::SELECT);
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
case DwarfControl::MenuCancel:
|
|
|
|
// case DwarfControl::MenuCancel:
|
|
|
|
keyQueue.push(interface_key::LEAVESCREEN);
|
|
|
|
// keyQueue.push(interface_key::LEAVESCREEN);
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
default:
|
|
|
|
// default:
|
|
|
|
break;
|
|
|
|
// break;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
return CR_OK;
|
|
|
|
return CR_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|