diff options
| author | Alexander Gavrilov | 2012-09-02 14:10:58 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-09-02 14:10:58 +0400 |
| commit | 3713c5ea9eaab262be1d08a92781f62bbb6cf95a (patch) | |
| tree | 473208e4f48d20b52d12be37491ef1bf9b78a92b /plugins/tweak.cpp | |
| parent | febfc9aa5b87928432060c9c55f2710a2a6201cc (diff) | |
| download | dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.gz dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.bz2 dfhack-3713c5ea9eaab262be1d08a92781f62bbb6cf95a.tar.xz | |
Add some APIs required by steam engine to the core.
Diffstat (limited to 'plugins/tweak.cpp')
| -rw-r--r-- | plugins/tweak.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/tweak.cpp b/plugins/tweak.cpp index fa99f39e..9853f7f9 100644 --- a/plugins/tweak.cpp +++ b/plugins/tweak.cpp @@ -211,9 +211,6 @@ struct patrol_duty_hook : df::squad_order_trainst IMPLEMENT_VMETHOD_INTERPOSE(patrol_duty_hook, isPatrol); -static const int AREA_MAP_WIDTH = 23; -static const int MENU_WIDTH = 30; - struct readable_build_plate_hook : df::viewscreen_dwarfmodest { typedef df::viewscreen_dwarfmodest interpose_base; @@ -228,10 +225,8 @@ struct readable_build_plate_hook : df::viewscreen_dwarfmodest ui_build_selector->building_subtype == trap_type::PressurePlate && ui_build_selector->plate_info.flags.bits.units) { - auto wsize = Screen::getWindowSize(); - int x = wsize.x - MENU_WIDTH - 1; - if (*ui_menu_width == 1 || *ui_area_map_width == 2) - x -= AREA_MAP_WIDTH + 1; + auto dims = Gui::getDwarfmodeViewDims(); + int x = dims.menu_x1; Screen::Pen pen(' ',COLOR_WHITE); |
