Transfer market: no status text in the footer (the original shows only the club name)

The footer replaced the club name by feedback texts; the original has no
such line. The text stays in state_json(), it is just not drawn.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-09 14:03:44 +01:00
1 parent 4c099a93b3
commit 748eb4df01
3 files changed
+10 -13

No files matched your search

+4
View File
@@ -45,6 +45,10 @@ already did). Now pressed while held:
a player chosen in the squad list: yes takes him off the list, no leads on to the
offers.
- **No status text in the footer.** The transfer market replaced the club name in the
bottom row with status texts (rejections, hints). The original has no such line; the
club name now always stays there.
## Internal
- The drawing of the wide push button, of the calculator window (panel and keys) and
+3 -12
View File
@@ -590,8 +590,9 @@ std::string TransferMarketScreen::original_money(int32_t value) const {
if(result.size()<9)result.insert(0,9-result.size(),'%');
return result+exe_.cstring(::bmh::layout::CurrencySuffixText);
}
// Renders the complete 320x240 screen: frame (or plain bars), title, club name, the overview and a
// feedback line that replaces the club name line when set (shortened to fit 310 pixels).
// Renders the complete 320x240 screen: frame (or plain bars), title, club name and the overview. The original has
// no status line: the bottom row always shows the club name. feedback_ stays available in state_json() for hosts
// and tests but is never drawn.
Image TransferMarketScreen::render() const {
Image out=state_.decorated_background?frame_:Image(320,240);
if(!state_.decorated_background){rect(out,0,4,320,13,0x44);rect(out,1,5,318,11,0x39);rect(out,0,228,320,10,0x44);rect(out,1,229,318,8,0x39);}
@@ -600,16 +601,6 @@ Image TransferMarketScreen::render() const {
sprite_font_.draw(out,5,235,original_to_utf8(state_.club_name));
draw_market_overview(out);
if (search_open_) draw_search(out);
if (!feedback_.empty()) {
rect(out, 1, 227, 318, 12, 0x39);
auto line = feedback_;
while (!line.empty() && sprite_font_.text_width(line) > 310) {
size_t at = line.size() - 1;
while (at > 0 && (uint8_t(line[at]) & 0xc0) == 0x80) --at;
line.resize(at);
}
sprite_font_.draw(out, 5, 235, line);
}
return out;
}
+3 -1
View File
@@ -74,7 +74,9 @@ int main(int argc,char** argv){
const auto rejected_frame = screen.render();
screen.key("V");
screen.reject_action("Anderer sichtbarer Hinweis");
check(screen.render().pixels != rejected_frame.pixels, "host rejection is actually rendered in the footer");
// the original has no status line: the footer keeps showing the club name, the text stays in state_json()
check(screen.render().pixels == rejected_frame.pixels, "host rejection does not replace the club name in the footer");
check(screen.state_json().find("Anderer sichtbarer Hinweis")!=std::string::npos,"host rejection stays in the state");
TransferMarketScreen selected(argv[1],s);
auto marked_market=selected.click(210,28);selected.acknowledge_preview(s,quote(marked_market));