record and replay now-distinct shop click events
This commit is contained in:
@@ -830,11 +830,25 @@ static void replay_action(Element& action) {
|
||||
click_talk_rect(word_rect);
|
||||
handle_talk_node(word_rect.node);
|
||||
return;
|
||||
}else if(t == "click_shop_rect"){
|
||||
}
|
||||
|
||||
// Legacy action: clicking any shop button used to highlight both the info
|
||||
// button and the item text (which was a bug)
|
||||
else if(t == "click_shop_rect"){
|
||||
rectangle rect = boost::lexical_cast<rectangle>(action.GetText());
|
||||
click_shop_rect(rect);
|
||||
return;
|
||||
}else if(t == "end_shop_mode"){
|
||||
}
|
||||
// Fixed versions:
|
||||
else if(t == "click_shop_item"){
|
||||
rectangle rect = boost::lexical_cast<rectangle>(action.GetText());
|
||||
click_shop_rect(rect, false);
|
||||
}else if(t == "click_shop_item_help"){
|
||||
rectangle rect = boost::lexical_cast<rectangle>(action.GetText());
|
||||
click_shop_rect(rect, true);
|
||||
}
|
||||
|
||||
else if(t == "end_shop_mode"){
|
||||
end_shop_mode();
|
||||
return;
|
||||
}else if(t == "scrollbar_setPosition"){
|
||||
|
@@ -601,7 +601,8 @@ void do_explosion_anim(short /*sound_num*/,short special_draw, short snd) {
|
||||
|
||||
void click_shop_rect(rectangle area_rect, bool item_help) {
|
||||
if(recording){
|
||||
record_action("click_shop_rect", boost::lexical_cast<std::string>(area_rect));
|
||||
std::string action_name = item_help ? "click_shop_item_help" : "click_shop_item";
|
||||
record_action(action_name, boost::lexical_cast<std::string>(area_rect));
|
||||
}
|
||||
|
||||
draw_shop_graphics(!item_help,item_help,area_rect);
|
||||
|
Reference in New Issue
Block a user