mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Merge remote-tracking branch 'oblomov/me_cmd'
This commit is contained in:
commit
5415256a52
9 changed files with 86 additions and 23 deletions
20
src/game.cpp
20
src/game.cpp
|
@ -114,18 +114,6 @@ struct TextDestChat : public TextDest
|
|||
// Discard empty line
|
||||
if(text == L"")
|
||||
return;
|
||||
|
||||
// Parse command (server command starts with "/#")
|
||||
if(text[0] == L'/' && text[1] != L'#')
|
||||
{
|
||||
std::wstring reply = L"Local: ";
|
||||
|
||||
reply += L"Local commands not yet supported. "
|
||||
L"Server prefix is \"/#\".";
|
||||
|
||||
m_client->addChatMessage(reply);
|
||||
return;
|
||||
}
|
||||
|
||||
// Send to others
|
||||
m_client->sendChatMessage(text);
|
||||
|
@ -1332,6 +1320,14 @@ void the_game(
|
|||
&g_menumgr, dest,
|
||||
L""))->drop();
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_cmd")))
|
||||
{
|
||||
TextDest *dest = new TextDestChat(&client);
|
||||
|
||||
(new GUITextInputMenu(guienv, guiroot, -1,
|
||||
&g_menumgr, dest,
|
||||
L"/"))->drop();
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_freemove")))
|
||||
{
|
||||
if(g_settings.getBool("free_move"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue