5
5
#include " figure/figure.h"
6
6
#include " game/resource.h"
7
7
#include " city/finance.h"
8
+ #include " graphics/window.h"
9
+ #include " graphics/elements/arrow_button.h"
8
10
#include " graphics/elements/panel.h"
9
11
#include " graphics/view/view.h"
10
12
#include " graphics/elements/lang_text.h"
@@ -35,8 +37,19 @@ void building_tax_collector::window_info_background(object_info &c) {
35
37
int amount = config_get (CONFIG_GP_CH_NEW_TAX_COLLECTION_SYSTEM) ? b->deben_storage : b->tax_income_or_storage ;
36
38
ui::label_num (8 , 0 , amount, {44 + width, 43 });
37
39
38
- ui::label (60 , 1 , {c.width_blocks * 16 / 2 + 50 , 40 });
39
- ui::label_percent (city_finance_tax_percentage (), {c.width_blocks * 16 / 2 + 150 , 40 });
40
+ int tax_block = c.width_blocks * 16 / 2 ;
41
+ ui::label (60 , 1 , {tax_block + 50 , 44 });
42
+ ui::label_percent (city_finance_tax_percentage (), {tax_block + 140 , 44 });
43
+ ui::arw_button ({tax_block + 170 , 36 }, true )
44
+ .onclick ([] (int , int ) {
45
+ city_finance_change_tax_percentage (-1 );
46
+ window_invalidate ();
47
+ });
48
+ ui::arw_button ({tax_block + 194 , 36 }, false )
49
+ .onclick ([] (int , int ) {
50
+ city_finance_change_tax_percentage (1 );
51
+ window_invalidate ();
52
+ });
40
53
41
54
if (!c.has_road_access ) {
42
55
window_building_draw_description (c, 69 , 25 );
@@ -56,8 +69,6 @@ void building_tax_collector::window_info_background(object_info &c) {
56
69
57
70
inner_panel_draw (c.offset .x + 16 , c.offset .y + 136 , c.width_blocks - 2 , 4 );
58
71
window_building_draw_employment (&c, 142 );
59
-
60
- ui::end_widget ();
61
72
}
62
73
63
74
void building_tax_collector::update_month () {
0 commit comments