diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2022-06-04 06:26:32 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-03 22:26:32 -0500 |
| commit | d4e395627131befea60d19a35373582894eb17d3 (patch) | |
| tree | 5536ab0a6367cc867fab12b28a1c8e2e8f9db6e9 /src/courtroom.cpp | |
| parent | c3a5bfb98a50396a75b29bb39c4b3eb25b1353c5 (diff) | |
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>
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index c525ef14..ee977150 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -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(); |
