Make the console message height configurable
This commit is contained in:
parent
896b90f600
commit
314968723d
@ -702,6 +702,9 @@ fall_bobbing_amount (Fall bobbing factor) float 0.03
|
||||
# In-game chat console height, between 0.1 (10%) and 1.0 (100%).
|
||||
console_height (Console height) float 0.6 0.1 1.0
|
||||
|
||||
# In-game chat message console height, between 0.1 (10%) and 1.0 (100%).
|
||||
console_message_height (Console message height) float 0.25 0.1 1.0
|
||||
|
||||
# In-game chat console background color (R,G,B).
|
||||
console_color (Console color) string (0,0,0)
|
||||
|
||||
|
@ -809,6 +809,10 @@
|
||||
# type: float min: 0.1 max: 1
|
||||
# console_height = 0.6
|
||||
|
||||
# In-game chat message console height, between 0.1 (10%) and 1.0 (100%).
|
||||
# type: float min: 0.1 max: 1
|
||||
# console_message_height = 0.25
|
||||
|
||||
# In-game chat console background color (R,G,B).
|
||||
# type: string
|
||||
# console_color = (0,0,0)
|
||||
|
@ -1935,12 +1935,12 @@ void Game::processKeyInput()
|
||||
m_game_ui->toggleChat();
|
||||
else
|
||||
#endif
|
||||
openConsole(0.2, L"");
|
||||
openConsole(core::clamp(g_settings->getFloat("console_message_height"), 0.1f, 1.0f), L"");
|
||||
} else if (wasKeyDown(KeyType::CMD)) {
|
||||
openConsole(0.2, L"/");
|
||||
openConsole(core::clamp(g_settings->getFloat("console_message_height"), 0.1f, 1.0f), L"/");
|
||||
} else if (wasKeyDown(KeyType::CMD_LOCAL)) {
|
||||
if (client->modsLoaded())
|
||||
openConsole(0.2, L".");
|
||||
openConsole(core::clamp(g_settings->getFloat("console_message_height"), 0.1f, 1.0f), L".");
|
||||
else
|
||||
m_game_ui->showStatusText(wgettext("Client side scripting is disabled"));
|
||||
} else if (wasKeyDown(KeyType::CONSOLE)) {
|
||||
|
@ -223,6 +223,7 @@ void set_default_settings()
|
||||
settings->setDefault("menu_clouds", "true");
|
||||
settings->setDefault("opaque_water", "false");
|
||||
settings->setDefault("console_height", "0.6");
|
||||
settings->setDefault("console_message_height", "0.25");
|
||||
settings->setDefault("console_color", "(0,0,0)");
|
||||
settings->setDefault("console_alpha", "200");
|
||||
settings->setDefault("formspec_fullscreen_bg_color", "(0,0,0)");
|
||||
@ -654,6 +655,7 @@ void set_default_settings()
|
||||
} else if (x_inches >= 7.0) {
|
||||
settings->setDefault("device_is_tablet", "true");
|
||||
settings->setDefault("recent_chat_messages", "8");
|
||||
settings->setDefault("console_message_height", "0.4");
|
||||
}
|
||||
|
||||
if (x_inches <= 4.5) {
|
||||
@ -685,6 +687,7 @@ void set_default_settings()
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
settings->setDefault("device_is_tablet", "true");
|
||||
settings->setDefault("recent_chat_messages", "8");
|
||||
settings->setDefault("console_message_height", "0.4");
|
||||
}
|
||||
|
||||
// Set the size of the elements depending on the screen size
|
||||
|
Loading…
x
Reference in New Issue
Block a user