fix: we can not use arrows in MODE_TOWN_TARGET

This commit is contained in:
ALONSO Laurent
2021-10-04 09:20:32 +02:00
committed by Celtic Minstrel
parent 6ec906ccb1
commit 94b65859cc
2 changed files with 2 additions and 1 deletions

View File

@@ -1684,7 +1684,7 @@ bool handle_keystroke(const sf::Event& event){
if(i == 0) {
chr2 = kb::Z;
}
else if (overall_mode == MODE_FIRING || overall_mode == MODE_THROWING || overall_mode == MODE_SPELL_TARGET || overall_mode == MODE_TOWN_TARGET || overall_mode == MODE_FANCY_TARGET) {
else if (overall_mode == MODE_FIRING || overall_mode == MODE_THROWING || overall_mode == MODE_SPELL_TARGET || overall_mode == MODE_FANCY_TARGET) {
bool need_redraw=true;
if (i>=1 && i<=3 && center.y < univ.town->in_town_rect.bottom && center.y < univ.town->max_dim - 5)
center.y++;

View File

@@ -978,6 +978,7 @@ void place_talk_str(std::string str_to_place,std::string str_to_place2,short col
std::vector<rectangle> word_rects = draw_string_hilite(talk_gworld, word_place_rect, str, style, hilites, color ? Colours::DARK_BLUE : Colours::DARK_RED);
if(!talk_end_forced) {
talk_words.resize(9); // clean the talk_words (if this code is called many times)
// Now build the list of word rects
for(size_t i = 0; i < hilites.size(); i++) {
word_rect_t thisRect;