More ugliness reduction: Use smooth status indicator icons for lagmeter

Ansariel 2015-05-22 10:07:49 +02:00
parent 1fd15a58b7
commit 4607a63177
3 changed files with 25 additions and 16 deletions

View File

@ -40,9 +40,14 @@
#include "llfocusmgr.h"
#include "lltextbox.h"
const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
// <FS:Ansariel> Nicer icons
//const std::string LAG_CRITICAL_IMAGE_NAME = "lag_status_critical.tga";
//const std::string LAG_WARNING_IMAGE_NAME = "lag_status_warning.tga";
//const std::string LAG_GOOD_IMAGE_NAME = "lag_status_good.tga";
const std::string LAG_CRITICAL_IMAGE_NAME = "LagStatus_Critical";
const std::string LAG_WARNING_IMAGE_NAME = "LagStatus_Warning";
const std::string LAG_GOOD_IMAGE_NAME = "LagStatus_Good";
// </FS:Ansariel>
LLFloaterLagMeter::LLFloaterLagMeter(const LLSD& key)
: LLFloater(key)
@ -171,7 +176,7 @@ void LLFloaterLagMeter::determineClient()
if(find_cause)
{
if(gSavedSettings.getF32("RenderFarClip") > 128)
if(gSavedSettings.getF32("RenderFarClip") > 128.f)
{
mClientCause->setText( getString("client_draw_distance_cause_msg", mStringArgs) );
}

View File

@ -1032,4 +1032,8 @@ with the same filename but different name
<texture name="TrashItem_Menu" file_name="icons/TrashItem_Menu.png" preload="false" />
<texture name="Active_Voice_Tab" file_name="legacy/active_voice_tab.tga" preload="false" />
<texture name="LagStatus_Good" file_name="icons/green_square.png" preload="false" />
<texture name="LagStatus_Warning" file_name="icons/yellow_square.png" preload="false" />
<texture name="LagStatus_Critical" file_name="icons/red_square.png" preload="false" />
</textures>

View File

@ -179,14 +179,14 @@
<button
follows="top|left"
height="16"
image_selected="lag_status_good.tga"
image_unselected="lag_status_good.tga"
image_selected="LagStatus_Good"
image_unselected="LagStatus_Good"
layout="topleft"
left="8"
name="client_lagmeter"
tab_stop="false"
tool_tip="Client lag status"
top="24"
top="22"
width="16" />
<text
type="string"
@ -197,7 +197,7 @@
layout="topleft"
left_pad="3"
name="client"
top_delta="0"
top_delta="2"
width="128">
Client
</text>
@ -227,14 +227,14 @@
<button
follows="top|left"
height="16"
image_selected="lag_status_good.tga"
image_unselected="lag_status_good.tga"
image_selected="LagStatus_Warning"
image_unselected="LagStatus_Warning"
layout="topleft"
left="8"
name="network_lagmeter"
tab_stop="false"
tool_tip="Network lag status"
top="64"
top="62"
width="16" />
<text
type="string"
@ -245,7 +245,7 @@
layout="topleft"
left_pad="3"
name="network"
top_delta="0"
top_delta="2"
width="128">
Network
</text>
@ -275,14 +275,14 @@
<button
follows="top|left"
height="16"
image_selected="lag_status_good.tga"
image_unselected="lag_status_good.tga"
image_selected="LagStatus_Critical"
image_unselected="LagStatus_Critical"
layout="topleft"
left="8"
name="server_lagmeter"
tab_stop="false"
tool_tip="Server lag status"
top="104"
top="102"
width="16" />
<text
type="string"
@ -293,7 +293,7 @@
layout="topleft"
left_pad="3"
name="server"
top_delta="0"
top_delta="2"
width="60">
Server
</text>