Make the pick radius on the minimap configurable

meow-7.2.2
Ansariel 2014-02-07 10:49:28 +01:00
parent 5d3a48e55c
commit 3d46c059e8
4 changed files with 49 additions and 5 deletions

View File

@ -21823,6 +21823,25 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>1</integer>
</map>
<key>FSMinimapPickScale</key>
<map>
<key>Comment</key>
<string>Controls the pick radius on the minimap</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>3.0</real>
<key>SanityCheckType</key>
<string>GreaterThan</string>
<key>SanityValue</key>
<array>
<real>0.4999</real>
</array>
<key>SanityComment</key>
<string>This value should at least be 0.5.</string>
</map>
</map>
</llsd>

View File

@ -588,7 +588,11 @@ void LLNetMap::draw()
mClosestAgentsToCursor.clear();
// [/SL:KB]
F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop
F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE);
// <FS:Ansariel> Configurable pick distance
//F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE);
static LLCachedControl<F32> fsMinimapPickScale(gSavedSettings, "FSMinimapPickScale");
F32 min_pick_dist_squared = (mDotRadius * fsMinimapPickScale) * (mDotRadius * fsMinimapPickScale);
// </FS:Ansariel>
LLVector3 pos_map;
uuid_vec_t avatar_ids;
@ -793,7 +797,7 @@ void LLNetMap::draw()
// <FS:Ansariel> Draw pick radius; from Ayamo Nozaki (Exodus Viewer)
gGL.color4fv((map_frustum_color()).mV);
gl_circle_2d(local_mouse_x, local_mouse_y, mDotRadius * MIN_PICK_SCALE, 32, true);
gl_circle_2d(local_mouse_x, local_mouse_y, mDotRadius * fsMinimapPickScale, 32, true);
// </FS:Ansariel>
if( rotate_map )

View File

@ -87,6 +87,7 @@
<combo_box.item label="Weltkarte öffnen" name="1"/>
<combo_box.item label="Zur Position teleportieren" name="2"/>
</combo_box>
<slider label="Auswahlradius-Skalierung:" tool_tip="Steuert den Radius für den Auswahlbereich auf der Minikarte" name="FSMinimapPickScale"/>
<text name="world_map_options_label">
Weltkarte-Optionen:
</text>

View File

@ -592,7 +592,7 @@
text_color="White_25">
(requires restart)
</text>
<check_box
top_pad="0"
follows="left|top"
@ -616,7 +616,7 @@
width="200">
Minimap options:
</text>
<check_box
top_pad="4"
follows="left|top"
@ -629,7 +629,7 @@
width="350"
control_name="MiniMapRotate"
tool_tip="Rotate miniature world map to avatar direction."/>
<text
follows="left|top"
type="string"
@ -664,6 +664,26 @@
value="2"/>
</combo_box>
<slider
can_edit_text="true"
control_name="FSMinimapPickScale"
decimal_digits="1"
follows="left|top"
height="16"
increment="0.5"
initial_value="1"
layout="topleft"
label="Pick scale:"
left="35"
label_width="150"
max_val="10"
min_val="0.5"
name="FSMinimapPickScale"
show_text="true"
tool_tip="Controls the radius of the pick range on the minimap"
width="360"
top_pad="5"/>
<text
top_pad="6"
type="string"