FIRE-20818: User-selectable font and size for script editor

master
Ansariel 2018-02-01 10:34:13 +01:00
parent 372d63747e
commit 318b5e53aa
5 changed files with 90 additions and 4 deletions

View File

@ -1135,6 +1135,10 @@ LLFontGL* LLFontGL::getFontByName(const std::string& name)
{
return getFontScripting();
}
else if (name == "Monospace")
{
return getFontMonospace();
}
// </FS:CR>
else
{

View File

@ -24532,6 +24532,28 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>3</integer>
</map>
<key>FSScriptingFontName</key>
<map>
<key>Comment</key>
<string>The name of the font used for the LSL script editor</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Scripting</string>
</map>
<key>FSScriptingFontSize</key>
<map>
<key>Comment</key>
<string>The size of the font used for the LSL script editor</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>Scripting</string>
</map>
</map>
</llsd>

View File

@ -551,6 +551,14 @@ BOOL LLScriptEdCore::postBuild()
mEditor = getChild<LLScriptEditor>("Script Editor");
// <FS:Ansariel> FIRE-20818: User-selectable font and size for script editor
LLFontGL* font = LLFontGL::getFont(LLFontDescriptor(gSavedSettings.getString("FSScriptingFontName"), gSavedSettings.getString("FSScriptingFontSize"), LLFontGL::NORMAL));
if (font)
{
mEditor->setFont(font);
}
// </FS:Ansariel>
// NaCl - LSL Preprocessor
mCurrentEditor = mEditor;
if (gSavedSettings.getBOOL("_NACL_LSLPreprocessor"))

View File

@ -199,6 +199,20 @@
<spinner label="Z-Position" name="Z pos" label_width="60" width="135"/>
<check_box label="Werte sind in Prozent" tool_tip="Standardwerte sind Prozentangaben mit einem Wert von 50 für jede Achse" name="FSPivotPercToggle"/>
<button label="Standard-Erstellungsberechtigungen" name="fs_default_creation_permissions"/>
<text name="text_box_scripting_font" width="130">
Schrift für Skript-Editor:
</text>
<combo_box name="FSScriptingFontName" tool_tip="Name der Schrift, die für den Skript-Editor verwendet wird">
<combo_item name="Monospace" label="Monospace"/>
<combo_item name="Scripting" label="Scripting"/>
</combo_box>
<combo_box name="FSScriptingFontSize" tool_tip="Größe der Schrift, die für den Skript-Editor verwendet wird">
<combo_item name="Monospace" label="Monospace"/>
<combo_item name="Scripting" label="Scripting"/>
<combo_item name="Small" label="Klein"/>
<combo_item name="Medium" label="Mittel"/>
<combo_item name="Large" label="Groß"/>
</combo_box>
<check_box label="LSL-Präprozessor aktivieren" tool_tip="Aktiviert die Präprozessorunterstützung für LSL-Skripte" name="preproc_checkbox"/>
<check_box label="Skript-Optimierer" tool_tip="Optimiert den von Skripten benötigten Platz." name="preprocoptimizer_checkbox"/>
<check_box label="switch()-Befehl" tool_tip="Stellt den switch()-Befehl zur Ablaufsteuerung bereit." name="preprocswitch_checkbox"/>

View File

@ -1099,13 +1099,11 @@
left_delta="1"
follows="left|top"
height="18"
left="10"
max_chars="20"
mouse_opaque="true"
name="material"
width="87"
control_name="FSBuildPrefs_Material"
tool_tip="">
control_name="FSBuildPrefs_Material">
<combo_item name="Stone" value="Stone" label="Stone"/>
<combo_item name="Metal" value="Metal" label="Metal"/>
<combo_item name="Glass" value="Glass" label="Glass"/>
@ -1360,10 +1358,50 @@
function="Pref.PermsDefault" />
</button>
<text
top_pad="80"
left="8"
follows="left|top"
name="text_box_scripting_font"
width="100">
Script Editor Font:
</text>
<combo_box
allow_text_entry="false"
top_delta="-5"
left_pad="5"
follows="left|top"
max_chars="20"
mouse_opaque="true"
name="FSScriptingFontName"
width="100"
control_name="FSScriptingFontName"
tool_tip="Name of the font used in the LSL script editor">
<combo_item name="Monospace" value="Monospace" label="Monospace"/>
<combo_item name="Scripting" value="Scripting" label="Scripting"/>
</combo_box>
<combo_box
allow_text_entry="false"
top_delta="0"
left_pad="5"
follows="left|top"
max_chars="20"
mouse_opaque="true"
name="FSScriptingFontSize"
width="100"
control_name="FSScriptingFontSize"
tool_tip="Size of the font used in the LSL script editor">
<combo_item name="Monospace" value="Monospace" label="Monospace"/>
<combo_item name="Scripting" value="Scripting" label="Scripting"/>
<combo_item name="Small" value="Small" label="Small"/>
<combo_item name="Medium" value="Medium" label="Medium"/>
<combo_item name="Large" value="Large" label="Large"/>
</combo_box>
<check_box
follows="left|top"
height="16"
top_pad="105"
top_pad="10"
left="5"
label="Enable LSL preprocessor"
tool_tip="When checked, the LSL preprocessor is enabled."