improve placeholder text for IC and OOC (#753)
* improve placeholder text for IC and OOC * Keep showname box placeholder at "showname" so as not to be confusing * Apply my own suggestions * Revert "Keep showname box placeholder at "showname" so as not to be confusing" This reverts commit bad5507b9e4b9501d27b7b46e66c5e1cc2eb9859. * Bring back showname for showname box let "update_character" handle placeholder text properly Fix spectator placeholder text not appearing if switching to spectator using /switch, etc. * fix an oopsie Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
This commit is contained in:
parent
c3a5bfb98a
commit
d4e3956271
@ -188,13 +188,6 @@ void Courtroom::char_clicked(int n_char)
|
||||
enter_courtroom();
|
||||
set_courtroom_size();
|
||||
}
|
||||
|
||||
if (n_char != -1) {
|
||||
ui_ic_chat_name->setPlaceholderText(char_list.at(n_char).name);
|
||||
}
|
||||
else {
|
||||
ui_ic_chat_name->setPlaceholderText("Spectator");
|
||||
}
|
||||
}
|
||||
|
||||
void Courtroom::put_button_in_place(int starting, int chars_on_this_page)
|
||||
|
@ -173,7 +173,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
|
||||
ui_ic_chat_message = new QLineEdit(this);
|
||||
ui_ic_chat_message->setFrame(false);
|
||||
ui_ic_chat_message->setPlaceholderText(tr("Message"));
|
||||
ui_ic_chat_message->setPlaceholderText(tr("Message in-character"));
|
||||
ui_ic_chat_message_filter = new AOLineEditFilter();
|
||||
ui_ic_chat_message_filter->preserve_selection = true;
|
||||
ui_ic_chat_message->installEventFilter(ui_ic_chat_message_filter);
|
||||
@ -191,6 +191,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
ui_ooc_chat_message = new QLineEdit(this);
|
||||
ui_ooc_chat_message->setFrame(false);
|
||||
ui_ooc_chat_message->setObjectName("ui_ooc_chat_message");
|
||||
ui_ooc_chat_message->setPlaceholderText(tr("Message out-of-character"));
|
||||
|
||||
ui_ooc_chat_name = new QLineEdit(this);
|
||||
ui_ooc_chat_name->setFrame(false);
|
||||
@ -1553,9 +1554,12 @@ void Courtroom::update_character(int p_cid)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_cid != -1) // there is no name at char_list -1, and we crash if we try
|
||||
// to find one
|
||||
if (m_cid != -1) {
|
||||
ui_ic_chat_name->setPlaceholderText(char_list.at(m_cid).name);
|
||||
}
|
||||
else {
|
||||
ui_ic_chat_name->setPlaceholderText("Spectator");
|
||||
}
|
||||
ui_char_select_background->hide();
|
||||
ui_ic_chat_message->setEnabled(m_cid != -1);
|
||||
ui_ic_chat_message->setFocus();
|
||||
|
Loading…
Reference in New Issue
Block a user