|
|
@ -408,7 +408,7 @@ protected:
|
|
|
|
//bool redo_search;
|
|
|
|
//bool redo_search;
|
|
|
|
string search_string;
|
|
|
|
string search_string;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
protected:
|
|
|
|
int *cursor_pos;
|
|
|
|
int *cursor_pos;
|
|
|
|
char select_key;
|
|
|
|
char select_key;
|
|
|
|
bool valid;
|
|
|
|
bool valid;
|
|
|
@ -1074,15 +1074,24 @@ class trade_search_merc : public trade_search_base
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
virtual void render() const
|
|
|
|
virtual void render() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (viewscreen->counteroffer.size() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// The merchant is proposing a counteroffer.
|
|
|
|
|
|
|
|
// Not only is there nothing to search,
|
|
|
|
|
|
|
|
// but the native hotkeys are where we normally write.
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print_search_option(2, -1);
|
|
|
|
print_search_option(2, -1);
|
|
|
|
|
|
|
|
|
|
|
|
if (!search_string.empty())
|
|
|
|
if (!search_string.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
make_text_dim(2, 37, 22);
|
|
|
|
|
|
|
|
make_text_dim(42, gps->dimx-2, 22);
|
|
|
|
|
|
|
|
int32_t x = 2;
|
|
|
|
int32_t x = 2;
|
|
|
|
int32_t y = gps->dimy - 3;
|
|
|
|
int32_t y = gps->dimy - 3;
|
|
|
|
OutputString(COLOR_YELLOW, x, y, "Note: Clear search to trade");
|
|
|
|
make_text_dim(2, 37, y);
|
|
|
|
|
|
|
|
make_text_dim(42, gps->dimx-2, y);
|
|
|
|
|
|
|
|
OutputString(COLOR_LIGHTRED, x, y, string(1, select_key + 'A' - 'a'));
|
|
|
|
|
|
|
|
OutputString(COLOR_WHITE, x, y, ": Clear search to trade ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1116,15 +1125,24 @@ class trade_search_fort : public trade_search_base
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
virtual void render() const
|
|
|
|
virtual void render() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if (viewscreen->counteroffer.size() > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// The merchant is proposing a counteroffer.
|
|
|
|
|
|
|
|
// Not only is there nothing to search,
|
|
|
|
|
|
|
|
// but the native hotkeys are where we normally write.
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print_search_option(42, -1);
|
|
|
|
print_search_option(42, -1);
|
|
|
|
|
|
|
|
|
|
|
|
if (!search_string.empty())
|
|
|
|
if (!search_string.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
make_text_dim(2, 37, 22);
|
|
|
|
|
|
|
|
make_text_dim(42, gps->dimx-2, 22);
|
|
|
|
|
|
|
|
int32_t x = 42;
|
|
|
|
int32_t x = 42;
|
|
|
|
int32_t y = gps->dimy - 3;
|
|
|
|
int32_t y = gps->dimy - 3;
|
|
|
|
OutputString(COLOR_YELLOW, x, y, "Note: Clear search to trade");
|
|
|
|
make_text_dim(2, 37, y);
|
|
|
|
|
|
|
|
make_text_dim(42, gps->dimx-2, y);
|
|
|
|
|
|
|
|
OutputString(COLOR_LIGHTRED, x, y, string(1, select_key + 'A' - 'a'));
|
|
|
|
|
|
|
|
OutputString(COLOR_WHITE, x, y, ": Clear search to trade ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|