1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-21 23:28:48 -05:00

Add console height setting (#5136)

This commit is contained in:
Ezhh 2017-01-29 16:10:17 +00:00 committed by Zeno-
parent 707e27b5c2
commit 0c9189d109
4 changed files with 10 additions and 1 deletions

View File

@ -477,6 +477,9 @@ fall_bobbing_amount (Fall bobbing) float 0.0
# - pageflip: quadbuffer based 3d. # - pageflip: quadbuffer based 3d.
3d_mode (3D mode) enum none none,anaglyph,interlaced,topbottom,sidebyside,pageflip 3d_mode (3D mode) enum none none,anaglyph,interlaced,topbottom,sidebyside,pageflip
# In-game chat console height, between 0.1 (10%) and 1.0 (100%).
console_height (Console height) float 1.0 0.1 1.0
# In-game chat console background color (R,G,B). # In-game chat console background color (R,G,B).
console_color (Console color) string (0,0,0) console_color (Console color) string (0,0,0)

View File

@ -548,6 +548,10 @@
# type: enum values: none, anaglyph, interlaced, topbottom, sidebyside, pageflip # type: enum values: none, anaglyph, interlaced, topbottom, sidebyside, pageflip
# 3d_mode = none # 3d_mode = none
# In-game chat console height, between 0.1 (10%) and 1.0 (100%).
# type: float
# console_height = 1.0
# In-game chat console background color (R,G,B). # In-game chat console background color (R,G,B).
# type: string # type: string
# console_color = (0,0,0) # console_color = (0,0,0)

View File

@ -138,6 +138,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("cloud_radius", "12"); settings->setDefault("cloud_radius", "12");
settings->setDefault("menu_clouds", "true"); settings->setDefault("menu_clouds", "true");
settings->setDefault("opaque_water", "false"); settings->setDefault("opaque_water", "false");
settings->setDefault("console_height", "1.0");
settings->setDefault("console_color", "(0,0,0)"); settings->setDefault("console_color", "(0,0,0)");
settings->setDefault("console_alpha", "200"); settings->setDefault("console_alpha", "200");
settings->setDefault("selectionbox_color", "(0,0,0)"); settings->setDefault("selectionbox_color", "(0,0,0)");

View File

@ -2627,7 +2627,8 @@ void Game::processKeyInput(VolatileRunFlags *flags,
} else if (wasKeyDown(KeyType::CMD)) { } else if (wasKeyDown(KeyType::CMD)) {
openConsole(0.2, L"/"); openConsole(0.2, L"/");
} else if (wasKeyDown(KeyType::CONSOLE)) { } else if (wasKeyDown(KeyType::CONSOLE)) {
openConsole(1); openConsole(core::clamp(
g_settings->getFloat("console_height"), 0.1f, 1.0f));
} else if (wasKeyDown(KeyType::FREEMOVE)) { } else if (wasKeyDown(KeyType::FREEMOVE)) {
toggleFreeMove(statustext_time); toggleFreeMove(statustext_time);
} else if (wasKeyDown(KeyType::JUMP)) { } else if (wasKeyDown(KeyType::JUMP)) {