@@ -745,7 +745,7 @@ static void draw_foreground() {
745
745
}
746
746
747
747
// general buttons
748
- int y_offset = (context.storage_show_special_orders ) ? context.y_offset_submenu : 0 ;
748
+ int y_offset = (context.storage_show_special_orders ) ? context.subwnd_y_offset : 0 ;
749
749
int height_blocks = (context.storage_show_special_orders ) ? context.height_blocks_submenu : context.height_blocks ;
750
750
751
751
ui::img_button (GROUP_CONTEXT_ICONS, vec2i (14 , y_offset + 16 * height_blocks - 40 ), {28 , 28 }, 0 )
@@ -769,31 +769,31 @@ static void draw_foreground() {
769
769
}
770
770
});
771
771
772
- if (context.go_to_advisor .first ) {
772
+ if (! context.storage_show_special_orders && context. go_to_advisor .first && is_advisor_available (context. go_to_advisor . first ) ) {
773
773
int img_offset = (context.go_to_advisor .left_a - 1 ) * 3 ;
774
774
ui::img_button (GROUP_MESSAGE_ADVISOR_BUTTONS, vec2i (40 , 16 * context.height_blocks - 40 ), {28 , 28 }, img_offset)
775
775
.onclick ([&context] (int , int ) {
776
776
window_advisors_show_advisor (context.go_to_advisor .first );
777
777
});
778
778
}
779
779
780
- if (context.go_to_advisor .left_a ) {
780
+ if (! context.storage_show_special_orders && context. go_to_advisor .left_a && is_advisor_available (context. go_to_advisor . left_a ) ) {
781
781
int img_offset = (context.go_to_advisor .left_a - 1 ) * 3 ;
782
782
ui::img_button (GROUP_MESSAGE_ADVISOR_BUTTONS, vec2i (40 , 16 * context.height_blocks - 40 ), {28 , 28 }, img_offset)
783
783
.onclick ([&context] (int , int ) {
784
784
window_advisors_show_advisor (context.go_to_advisor .left_a );
785
785
});
786
786
}
787
787
788
- if (context.go_to_advisor .left_b ) {
788
+ if (! context.storage_show_special_orders && context. go_to_advisor .left_b && is_advisor_available (context. go_to_advisor . left_b ) ) {
789
789
int img_offset = (context.go_to_advisor .left_b - 1 ) * 3 ;
790
790
ui::img_button (GROUP_MESSAGE_ADVISOR_BUTTONS, vec2i (65 , 16 * context.height_blocks - 40 ), {28 , 28 }, img_offset)
791
791
.onclick ([&context] (int , int ) {
792
792
window_advisors_show_advisor (context.go_to_advisor .left_b );
793
793
});
794
794
}
795
795
796
- if (b) {
796
+ if (!context. storage_show_special_orders && b) {
797
797
int workers_needed = model_get_building (b->type )->laborers ;
798
798
if (workers_needed) {
799
799
pcstr label = (b->state == BUILDING_STATE_VALID ? " x" : " " );
@@ -809,7 +809,7 @@ static void draw_foreground() {
809
809
}
810
810
}
811
811
812
- if (context.figure .draw_debug_path ) {
812
+ if (!context. storage_show_special_orders && context.figure .draw_debug_path ) {
813
813
figure* f = figure_get (context.figure .figure_ids [0 ]);
814
814
pcstr label = (f->draw_debug_mode ? " P" : " p" );
815
815
ui::button (label, {400 , 3 + 16 * context.height_blocks - 40 }, {20 , 20 })
@@ -819,7 +819,7 @@ static void draw_foreground() {
819
819
});
820
820
}
821
821
822
- if (context.show_overlay != OVERLAY_NONE) {
822
+ if (!context. storage_show_special_orders && context.show_overlay != OVERLAY_NONE) {
823
823
pcstr label = (game_state_overlay () != context.show_overlay ? " v" : " V" );
824
824
ui::button (label, {375 , 3 + 16 * context.height_blocks - 40 }, {20 , 20 })
825
825
.onclick ([&context] (int , int ) {
@@ -831,7 +831,6 @@ static void draw_foreground() {
831
831
window_invalidate ();
832
832
});
833
833
}
834
-
835
834
}
836
835
837
836
static int handle_specific_building_info_mouse (const mouse *m) {
0 commit comments