record and replay showing item info
This commit is contained in:
@@ -1275,6 +1275,17 @@ void handle_trade_places(int which_pc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void show_item_info(short item_hit) {
|
||||||
|
if(recording){
|
||||||
|
record_action("show_item_info", boost::lexical_cast<std::string>(item_hit));
|
||||||
|
}
|
||||||
|
if(stat_window == ITEM_WIN_SPECIAL)
|
||||||
|
put_spec_item_info(spec_item_array[item_hit]);
|
||||||
|
else if(stat_window == ITEM_WIN_QUESTS)
|
||||||
|
put_quest_info(spec_item_array[item_hit]);
|
||||||
|
else display_pc_item(stat_window, item_hit,univ.party[stat_window].items[item_hit],0);
|
||||||
|
}
|
||||||
|
|
||||||
bool handle_action(const sf::Event& event, cFramerateLimiter& fps_limiter) {
|
bool handle_action(const sf::Event& event, cFramerateLimiter& fps_limiter) {
|
||||||
long item_hit;
|
long item_hit;
|
||||||
bool are_done = false;
|
bool are_done = false;
|
||||||
@@ -1578,11 +1589,7 @@ bool handle_action(const sf::Event& event, cFramerateLimiter& fps_limiter) {
|
|||||||
} else handle_drop_item(item_hit, need_redraw);
|
} else handle_drop_item(item_hit, need_redraw);
|
||||||
break;
|
break;
|
||||||
case ITEMBTN_INFO:
|
case ITEMBTN_INFO:
|
||||||
if(stat_window == ITEM_WIN_SPECIAL)
|
show_item_info(item_hit);
|
||||||
put_spec_item_info(spec_item_array[item_hit]);
|
|
||||||
else if(stat_window == ITEM_WIN_QUESTS)
|
|
||||||
put_quest_info(spec_item_array[item_hit]);
|
|
||||||
else display_pc_item(stat_window, item_hit,univ.party[stat_window].items[item_hit],0);
|
|
||||||
break;
|
break;
|
||||||
case ITEMBTN_SPEC: // sell? That this code was reached indicates that the item was sellable
|
case ITEMBTN_SPEC: // sell? That this code was reached indicates that the item was sellable
|
||||||
// (Based on item_area_button_active)
|
// (Based on item_area_button_active)
|
||||||
|
@@ -95,5 +95,6 @@ void handle_trade_places(int which_pc);
|
|||||||
void handle_begin_talk(bool& need_reprint);
|
void handle_begin_talk(bool& need_reprint);
|
||||||
void handle_talk(location destination, bool& did_something, bool& need_redraw, bool& need_reprint);
|
void handle_talk(location destination, bool& did_something, bool& need_redraw, bool& need_reprint);
|
||||||
void give_help_and_record(short help1, short help2);
|
void give_help_and_record(short help1, short help2);
|
||||||
|
void show_item_info(short item_hit);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -550,6 +550,8 @@ static void replay_next_action() {
|
|||||||
sbar->setPosition(newPos);
|
sbar->setPosition(newPos);
|
||||||
}else if(t == "use_spec_item"){
|
}else if(t == "use_spec_item"){
|
||||||
use_spec_item(boost::lexical_cast<short>(next_action.GetText()), need_redraw);
|
use_spec_item(boost::lexical_cast<short>(next_action.GetText()), need_redraw);
|
||||||
|
}else if(t == "show_item_info"){
|
||||||
|
show_item_info(boost::lexical_cast<short>(next_action.GetText()));
|
||||||
}else{
|
}else{
|
||||||
std::ostringstream sstr;
|
std::ostringstream sstr;
|
||||||
sstr << "Couldn't replay action: " << next_action;
|
sstr << "Couldn't replay action: " << next_action;
|
||||||
|
Reference in New Issue
Block a user