Skip to content

Commit 8148c0f

Browse files
committed
ui: show home type for cart pusher
1 parent d901592 commit 8148c0f

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/scripts/common.js

-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ var advisor_trade_window = {}
112112
var advisor_imperial_window = {}
113113
var info_window_figure_enemy = {}
114114
var info_window_figure_animal = {}
115-
var info_window_figure_caravan_donkey = {}
116115
var roadblock_info_window = {}
117116
var hold_festival_window = {}
118117
var empty_info_window = {}

src/scripts/ui.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1007,16 +1007,17 @@ window figure_warship_info_window = {
10071007
}
10081008
}
10091009

1010-
info_window_figure_caravan_donkey = {
1010+
window info_window_figure_caravan_donkey = {
10111011
ui : __baseui(figure_info_window, {
1012-
bought_items : { type : "text", pos: [40, 180], size:[px(29), px(10)], wrap:px(29), font : FONT_NORMAL_WHITE_ON_DARK, font_link:FONT_NORMAL_YELLOW, rich:true, clip_area:true },
1013-
sold_items : { type : "text", pos: [40, 210], size:[px(29), px(10)], wrap:px(29), font : FONT_NORMAL_WHITE_ON_DARK, font_link:FONT_NORMAL_YELLOW, rich:true, clip_area:true },
1012+
bought_items : text({pos: [40, 180], size:[px(29), px(10)], wrap:px(29), font : FONT_NORMAL_WHITE_ON_DARK, font_link:FONT_NORMAL_YELLOW, rich:true, clip_area:true }),
1013+
sold_items : text({pos: [40, 210], size:[px(29), px(10)], wrap:px(29), font : FONT_NORMAL_WHITE_ON_DARK, font_link:FONT_NORMAL_YELLOW, rich:true, clip_area:true }),
10141014
})
10151015
}
10161016

10171017
window figure_carrier_info_window = {
10181018
ui : __baseui(figure_info_window, {
1019-
items : text({pos: [102, 158], size:[px(29), 20], font : FONT_NORMAL_BLACK_ON_DARK, rich:true }),
1019+
typename : text({pos: [92, 139], text:"${figure.class_name} ( @Y${figure.home}& )", font : FONT_NORMAL_BLACK_ON_DARK, rich:true, scroll:false }),
1020+
items : text({pos: [102, 158], size:[px(29), 20], font : FONT_NORMAL_BLACK_ON_DARK, rich:true, scroll:false }),
10201021
phrase : text({pos: [90, 180], font : FONT_NORMAL_BLACK_ON_DARK, wrap:px(22), multiline:true }),
10211022
})
10221023
}

src/window/window_figure_carrier_info.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ void figure_carrier_info_window::init(object_info &c) {
2121

2222
figure_cartpusher *f = c.figure_get<figure_cartpusher>();
2323

24-
bstring256 home_text;
25-
if (f->base.has_home()) {
26-
home_text = ui::str(41, f->home()->type);
27-
}
28-
ui["type"].text_var("%s %s", home_text.c_str(), ui::str(64, f->type()));
29-
3024
if (f->action_state() != FIGURE_ACTION_132_DOCKER_IDLING && f->base.resource_id) {
3125
int resource_img = image_id_resource_icon(f->base.resource_id);
3226
ui["items"].text_var("@I%u& %u %s %s", resource_img, f->base.resource_amount_full, ui::str(129, 20), ui::str(23, f->base.resource_id));

0 commit comments

Comments
 (0)