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:
1 parent
4c099a93b3
commit
748eb4df01
3 files changed
+10
-13
No files matched your search
@@ -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
|
a player chosen in the squad list: yes takes him off the list, no leads on to the
|
||||||
offers.
|
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
|
## Internal
|
||||||
|
|
||||||
- The drawing of the wide push button, of the calculator window (panel and keys) and
|
- The drawing of the wide push button, of the calculator window (panel and keys) and
|
||||||
|
|||||||
@@ -590,8 +590,9 @@ std::string TransferMarketScreen::original_money(int32_t value) const {
|
|||||||
if(result.size()<9)result.insert(0,9-result.size(),'%');
|
if(result.size()<9)result.insert(0,9-result.size(),'%');
|
||||||
return result+exe_.cstring(::bmh::layout::CurrencySuffixText);
|
return result+exe_.cstring(::bmh::layout::CurrencySuffixText);
|
||||||
}
|
}
|
||||||
// Renders the complete 320x240 screen: frame (or plain bars), title, club name, the overview and a
|
// Renders the complete 320x240 screen: frame (or plain bars), title, club name and the overview. The original has
|
||||||
// feedback line that replaces the club name line when set (shortened to fit 310 pixels).
|
// 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 TransferMarketScreen::render() const {
|
||||||
Image out=state_.decorated_background?frame_:Image(320,240);
|
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);}
|
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));
|
sprite_font_.draw(out,5,235,original_to_utf8(state_.club_name));
|
||||||
draw_market_overview(out);
|
draw_market_overview(out);
|
||||||
if (search_open_) draw_search(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;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,9 @@ int main(int argc,char** argv){
|
|||||||
const auto rejected_frame = screen.render();
|
const auto rejected_frame = screen.render();
|
||||||
screen.key("V");
|
screen.key("V");
|
||||||
screen.reject_action("Anderer sichtbarer Hinweis");
|
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);
|
TransferMarketScreen selected(argv[1],s);
|
||||||
auto marked_market=selected.click(210,28);selected.acknowledge_preview(s,quote(marked_market));
|
auto marked_market=selected.click(210,28);selected.acknowledge_preview(s,quote(marked_market));
|
||||||
|
|||||||
Reference in new issue
Block a user