Removed most llappearance -> llui dependencies (LLTrans remains). Moved LLInventoryIcon::EIconName into LLInventoryType. Moved LLInventoryIcon back to newview. Moved LLUI gl_* functions into llrender.
parent
5f8b940948
commit
cf7eb79fa7
|
|
@ -9,6 +9,7 @@ include(OpenSSL)
|
|||
include(UI)
|
||||
include(LLAppearance)
|
||||
include(LLCommon)
|
||||
include(LLInventory)
|
||||
include(LLVFS)
|
||||
include(LLXML)
|
||||
include(LLUI)
|
||||
|
|
@ -19,6 +20,7 @@ include_directories(
|
|||
${LLVFS_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
${LLUI_INCLUDE_DIRS}
|
||||
${LLINVENTORY_INCLUDE_DIRS}
|
||||
${CURL_INCLUDE_DIRS}
|
||||
${CARES_INCLUDE_DIRS}
|
||||
${OPENSSL_INCLUDE_DIRS}
|
||||
|
|
@ -44,6 +46,7 @@ target_link_libraries(appearance-utility-bin
|
|||
${CRYPTO_LIBRARIES}
|
||||
${UI_LIBRARIES}
|
||||
${LLAPPEARANCE_LIBRARIES}
|
||||
${LLINVENTORY_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${LLUI_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@
|
|||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
|
||||
//#include "llwearabledata.h"
|
||||
|
||||
enum EResult
|
||||
{
|
||||
RV_SUCCESS = 0,
|
||||
|
|
@ -150,6 +152,8 @@ EResult process_tbd(LLSD& input, std::ostream& output, LLSD& error_llsd)
|
|||
{
|
||||
EResult rv = RV_SUCCESS;
|
||||
|
||||
//LLWearableData wearable_data;
|
||||
|
||||
LLSD result;
|
||||
result["success"] = true;
|
||||
result["input"] = input;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ include_directories(
|
|||
set(llappearance_SOURCE_FILES
|
||||
llavatarappearance.cpp
|
||||
lldriverparam.cpp
|
||||
llinventoryicon.cpp
|
||||
lllocaltextureobject.cpp
|
||||
lltexglobalcolor.cpp
|
||||
lltexlayer.cpp
|
||||
|
|
@ -61,7 +60,6 @@ set(llappearance_HEADER_FILES
|
|||
|
||||
llavatarappearance.h
|
||||
lldriverparam.h
|
||||
llinventoryicon.h
|
||||
lljointpickname.h
|
||||
lllocaltextureobject.h
|
||||
lltexglobalcolor.h
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "llvfs.h"
|
||||
#include "lltexlayerparams.h"
|
||||
#include "lltexturemanagerbridge.h"
|
||||
#include "llui.h"
|
||||
#include "llrender2dutils.h"
|
||||
#include "llwearable.h"
|
||||
#include "llwearabledata.h"
|
||||
#include "llvertexbuffer.h"
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
#define LL_LLTEXLAYER_H
|
||||
|
||||
#include <deque>
|
||||
#include "llglslshader.h"
|
||||
#include "llgltexture.h"
|
||||
//#include "llframetimer.h"
|
||||
#include "llavatarappearancedefines.h"
|
||||
#include "lltexlayerparams.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
#include "llquantize.h"
|
||||
#include "lltexlayer.h"
|
||||
#include "lltexturemanagerbridge.h"
|
||||
#include "llrender2dutils.h"
|
||||
#include "llwearable.h"
|
||||
#include "llui.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// LLTexLayerParam
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "llviewervisualparam.h"
|
||||
#include "llxmltree.h"
|
||||
#include "llui.h"
|
||||
#include "llwearable.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -26,15 +26,15 @@
|
|||
|
||||
#include "linden_common.h"
|
||||
#include "llwearabletype.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "lltrans.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llui/lltrans.h"
|
||||
|
||||
struct WearableEntry : public LLDictionaryEntry
|
||||
{
|
||||
WearableEntry(const std::string &name,
|
||||
const std::string& default_new_name,
|
||||
LLAssetType::EType assetType,
|
||||
LLInventoryIcon::EIconName iconName,
|
||||
LLInventoryType::EIconName iconName,
|
||||
BOOL disable_camera_switch = FALSE,
|
||||
BOOL allow_multiwear = TRUE) :
|
||||
LLDictionaryEntry(name),
|
||||
|
|
@ -50,7 +50,7 @@ struct WearableEntry : public LLDictionaryEntry
|
|||
const LLAssetType::EType mAssetType;
|
||||
const std::string mLabel;
|
||||
const std::string mDefaultNewName; //keep mLabel for backward compatibility
|
||||
LLInventoryIcon::EIconName mIconName;
|
||||
LLInventoryType::EIconName mIconName;
|
||||
BOOL mDisableCameraSwitch;
|
||||
BOOL mAllowMultiwear;
|
||||
};
|
||||
|
|
@ -64,26 +64,26 @@ public:
|
|||
|
||||
LLWearableDictionary::LLWearableDictionary()
|
||||
{
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryIcon::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHAPE, new WearableEntry("shape", "New Shape", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SHAPE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SKIN, new WearableEntry("skin", "New Skin", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_SKIN, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_HAIR, new WearableEntry("hair", "New Hair", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_HAIR, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_EYES, new WearableEntry("eyes", "New Eyes", LLAssetType::AT_BODYPART, LLInventoryType::ICONNAME_BODYPART_EYES, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_SHIRT, new WearableEntry("shirt", "New Shirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_PANTS, new WearableEntry("pants", "New Pants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SHOES, new WearableEntry("shoes", "New Shoes", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SHOES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SOCKS, new WearableEntry("socks", "New Socks", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SOCKS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_JACKET, new WearableEntry("jacket", "New Jacket", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_JACKET, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_GLOVES, new WearableEntry("gloves", "New Gloves", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_GLOVES, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERSHIRT, new WearableEntry("undershirt", "New Undershirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_UNDERPANTS, new WearableEntry("underpants", "New Underpants", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_SKIRT, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_ALPHA, FALSE, TRUE));
|
||||
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_TATTOO, FALSE, TRUE));
|
||||
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
addEntry(LLWearableType::WT_PHYSICS, new WearableEntry("physics", "New Physics", LLAssetType::AT_CLOTHING, LLInventoryType::ICONNAME_CLOTHING_PHYSICS, TRUE, TRUE));
|
||||
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryType::ICONNAME_NONE, FALSE, FALSE));
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -131,7 +131,7 @@ LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type)
|
|||
}
|
||||
|
||||
// static
|
||||
LLInventoryIcon::EIconName LLWearableType::getIconName(LLWearableType::EType type)
|
||||
LLInventoryType::EIconName LLWearableType::getIconName(LLWearableType::EType type)
|
||||
{
|
||||
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
|
||||
const WearableEntry *entry = dict->lookup(type);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "llassettype.h"
|
||||
#include "lldictionary.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
class LLWearableType
|
||||
|
|
@ -64,7 +64,7 @@ public:
|
|||
static const std::string& getTypeLabel(EType type);
|
||||
static LLAssetType::EType getAssetType(EType type);
|
||||
static EType typeNameToType(const std::string& type_name);
|
||||
static LLInventoryIcon::EIconName getIconName(EType type);
|
||||
static LLInventoryType::EIconName getIconName(EType type);
|
||||
static BOOL getDisableCameraSwitch(EType type);
|
||||
static BOOL getAllowMultiwear(EType type);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,53 @@ public:
|
|||
IT_NONE = -1
|
||||
};
|
||||
|
||||
enum EIconName
|
||||
{
|
||||
ICONNAME_TEXTURE,
|
||||
ICONNAME_SOUND,
|
||||
ICONNAME_CALLINGCARD_ONLINE,
|
||||
ICONNAME_CALLINGCARD_OFFLINE,
|
||||
ICONNAME_LANDMARK,
|
||||
ICONNAME_LANDMARK_VISITED,
|
||||
ICONNAME_SCRIPT,
|
||||
ICONNAME_CLOTHING,
|
||||
ICONNAME_OBJECT,
|
||||
ICONNAME_OBJECT_MULTI,
|
||||
ICONNAME_NOTECARD,
|
||||
ICONNAME_BODYPART,
|
||||
ICONNAME_SNAPSHOT,
|
||||
|
||||
ICONNAME_BODYPART_SHAPE,
|
||||
ICONNAME_BODYPART_SKIN,
|
||||
ICONNAME_BODYPART_HAIR,
|
||||
ICONNAME_BODYPART_EYES,
|
||||
ICONNAME_CLOTHING_SHIRT,
|
||||
ICONNAME_CLOTHING_PANTS,
|
||||
ICONNAME_CLOTHING_SHOES,
|
||||
ICONNAME_CLOTHING_SOCKS,
|
||||
ICONNAME_CLOTHING_JACKET,
|
||||
ICONNAME_CLOTHING_GLOVES,
|
||||
ICONNAME_CLOTHING_UNDERSHIRT,
|
||||
ICONNAME_CLOTHING_UNDERPANTS,
|
||||
ICONNAME_CLOTHING_SKIRT,
|
||||
ICONNAME_CLOTHING_ALPHA,
|
||||
ICONNAME_CLOTHING_TATTOO,
|
||||
|
||||
ICONNAME_ANIMATION,
|
||||
ICONNAME_GESTURE,
|
||||
|
||||
ICONNAME_CLOTHING_PHYSICS,
|
||||
|
||||
ICONNAME_LINKITEM,
|
||||
ICONNAME_LINKFOLDER,
|
||||
ICONNAME_MESH,
|
||||
|
||||
ICONNAME_INVALID,
|
||||
ICONNAME_COUNT,
|
||||
ICONNAME_NONE = -1
|
||||
};
|
||||
|
||||
|
||||
// machine transation between type and strings
|
||||
static EType lookup(const std::string& name);
|
||||
static const std::string &lookup(EType type);
|
||||
|
|
|
|||
|
|
@ -37,10 +37,12 @@ set(llrender_SOURCE_FILES
|
|||
llgltexture.cpp
|
||||
llimagegl.cpp
|
||||
llpostprocess.cpp
|
||||
llrender2dutils.cpp
|
||||
llrendernavprim.cpp
|
||||
llrendersphere.cpp
|
||||
llshadermgr.cpp
|
||||
lltexture.cpp
|
||||
lluiimage.cpp
|
||||
llvertexbuffer.cpp
|
||||
)
|
||||
|
||||
|
|
@ -62,10 +64,12 @@ set(llrender_HEADER_FILES
|
|||
llimagegl.h
|
||||
llpostprocess.h
|
||||
llrender.h
|
||||
llrender2dutils.h
|
||||
llrendernavprim.h
|
||||
llrendersphere.h
|
||||
llshadermgr.h
|
||||
lltexture.h
|
||||
lluiimage.h
|
||||
llvertexbuffer.h
|
||||
)
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,164 @@
|
|||
/**
|
||||
* @file llrender2dutils.h
|
||||
* @brief GL function declarations for immediate-mode gl drawing.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// All immediate-mode gl drawing should happen here.
|
||||
|
||||
|
||||
#ifndef LL_RENDER2DUTILS_H
|
||||
#define LL_RENDER2DUTILS_H
|
||||
|
||||
#include "llpointer.h" // LLPointer<>
|
||||
#include "llrect.h"
|
||||
#include "llglslshader.h"
|
||||
|
||||
class LLColor4;
|
||||
class LLVector3;
|
||||
class LLVector2;
|
||||
class LLUIImage;
|
||||
class LLUUID;
|
||||
|
||||
extern const LLColor4 UI_VERTEX_COLOR;
|
||||
|
||||
BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom);
|
||||
void gl_state_for_2d(S32 width, S32 height);
|
||||
|
||||
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2);
|
||||
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color );
|
||||
void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, BOOL filled);
|
||||
void gl_rect_2d_simple( S32 width, S32 height );
|
||||
|
||||
void gl_draw_x(const LLRect& rect, const LLColor4& color);
|
||||
|
||||
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled = TRUE );
|
||||
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, BOOL filled = TRUE );
|
||||
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset = 0, BOOL filled = TRUE );
|
||||
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset = 0, BOOL filled = TRUE );
|
||||
void gl_rect_2d(const LLRect& rect, BOOL filled = TRUE );
|
||||
void gl_rect_2d(const LLRect& rect, const LLColor4& color, BOOL filled = TRUE );
|
||||
void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha = 1.0f);
|
||||
|
||||
void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &start_color, S32 lines);
|
||||
|
||||
void gl_circle_2d(F32 x, F32 y, F32 radius, S32 steps, BOOL filled);
|
||||
void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F32 start_angle, F32 end_angle);
|
||||
void gl_deep_circle( F32 radius, F32 depth );
|
||||
void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center );
|
||||
void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max_frac);
|
||||
void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, F32 end_radians, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
|
||||
void gl_draw_image(S32 x, S32 y, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
|
||||
void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase = 0.f );
|
||||
|
||||
void gl_rect_2d_simple_tex( S32 width, S32 height );
|
||||
|
||||
// segmented rectangles
|
||||
|
||||
/*
|
||||
TL |______TOP_________| TR
|
||||
/| |\
|
||||
_/_|__________________|_\_
|
||||
L| | MIDDLE | |R
|
||||
_|_|__________________|_|_
|
||||
\ | BOTTOM | /
|
||||
BL\|__________________|/ BR
|
||||
| |
|
||||
*/
|
||||
|
||||
typedef enum e_rounded_edge
|
||||
{
|
||||
ROUNDED_RECT_LEFT = 0x1,
|
||||
ROUNDED_RECT_TOP = 0x2,
|
||||
ROUNDED_RECT_RIGHT = 0x4,
|
||||
ROUNDED_RECT_BOTTOM = 0x8,
|
||||
ROUNDED_RECT_ALL = 0xf
|
||||
}ERoundedEdge;
|
||||
|
||||
|
||||
void gl_segmented_rect_2d_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_2d_fragment_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const F32 start_fragment, const F32 end_fragment, const U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec, U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec);
|
||||
|
||||
inline void gl_rect_2d( const LLRect& rect, BOOL filled )
|
||||
{
|
||||
gl_rect_2d( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, filled );
|
||||
}
|
||||
|
||||
inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL filled)
|
||||
{
|
||||
gl_rect_2d_offset_local( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, pixel_offset, filled );
|
||||
}
|
||||
|
||||
class LLImageProviderInterface;
|
||||
|
||||
class LLRender2D
|
||||
{
|
||||
LOG_CLASS(LLRender2D);
|
||||
public:
|
||||
static void initClass(LLImageProviderInterface* image_provider,
|
||||
const LLVector2* scale_factor);
|
||||
static void cleanupClass();
|
||||
|
||||
static void pushMatrix();
|
||||
static void popMatrix();
|
||||
static void loadIdentity();
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f);
|
||||
|
||||
static void setLineWidth(F32 width);
|
||||
static void setScaleFactor(const LLVector2& scale_factor);
|
||||
|
||||
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
|
||||
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
|
||||
|
||||
static LLVector2 sGLScaleFactor;
|
||||
private:
|
||||
static LLImageProviderInterface* sImageProvider;
|
||||
};
|
||||
|
||||
class LLImageProviderInterface
|
||||
{
|
||||
protected:
|
||||
LLImageProviderInterface() {};
|
||||
virtual ~LLImageProviderInterface() {};
|
||||
public:
|
||||
virtual LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority) = 0;
|
||||
virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority) = 0;
|
||||
virtual void cleanUp() = 0;
|
||||
};
|
||||
|
||||
|
||||
extern LLGLSLShader gSolidColorProgram;
|
||||
extern LLGLSLShader gUIProgram;
|
||||
|
||||
#endif // LL_RENDER2DUTILS_H
|
||||
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
// Project includes
|
||||
#include "lluiimage.h"
|
||||
#include "llui.h"
|
||||
#include "llrender2dutils.h"
|
||||
|
||||
LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image)
|
||||
: mName(name),
|
||||
|
|
@ -165,7 +165,7 @@ namespace LLInitParam
|
|||
return;
|
||||
}
|
||||
|
||||
LLUIImage* imagep = LLUI::getUIImage(name());
|
||||
LLUIImage* imagep = LLRender2D::getUIImage(name());
|
||||
if (imagep)
|
||||
{
|
||||
updateValue(imagep);
|
||||
|
|
@ -109,7 +109,6 @@ set(llui_SOURCE_FILES
|
|||
lluicolortable.cpp
|
||||
lluictrl.cpp
|
||||
lluictrlfactory.cpp
|
||||
lluiimage.cpp
|
||||
lluistring.cpp
|
||||
llundo.cpp
|
||||
llurlaction.cpp
|
||||
|
|
@ -219,7 +218,6 @@ set(llui_HEADER_FILES
|
|||
lluifwd.h
|
||||
llui.h
|
||||
lluicolor.h
|
||||
lluiimage.h
|
||||
lluistring.h
|
||||
llundo.h
|
||||
llurlaction.h
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ void LLComboBox::showList()
|
|||
LLCoordWindow window_size;
|
||||
getWindow()->getSize(&window_size);
|
||||
//HACK: shouldn't have to know about scale here
|
||||
mList->fitContents( 192, llfloor((F32)window_size.mY / LLUI::sGLScaleFactor.mV[VY]) - 50 );
|
||||
mList->fitContents( 192, llfloor((F32)window_size.mY / LLUI::getScaleFactor().mV[VY]) - 50 );
|
||||
|
||||
// Make sure that we can see the whole list
|
||||
LLRect root_view_local;
|
||||
|
|
|
|||
|
|
@ -2022,8 +2022,8 @@ void LLLineEditor::draw()
|
|||
LLRect screen_pos = calcScreenRect();
|
||||
LLCoordGL ime_pos( screen_pos.mLeft + pixels_after_scroll, screen_pos.mTop - lineeditor_v_pad );
|
||||
|
||||
ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]);
|
||||
ime_pos.mY = (S32) (ime_pos.mY * LLUI::sGLScaleFactor.mV[VY]);
|
||||
ime_pos.mX = (S32) (ime_pos.mX * LLUI::getScaleFactor().mV[VX]);
|
||||
ime_pos.mY = (S32) (ime_pos.mY * LLUI::getScaleFactor().mV[VY]);
|
||||
getWindow()->setLanguageTextInput( ime_pos );
|
||||
}
|
||||
}
|
||||
|
|
@ -2570,7 +2570,7 @@ void LLLineEditor::markAsPreedit(S32 position, S32 length)
|
|||
|
||||
S32 LLLineEditor::getPreeditFontSize() const
|
||||
{
|
||||
return llround(mGLFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]);
|
||||
return llround(mGLFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]);
|
||||
}
|
||||
|
||||
void LLLineEditor::setReplaceNewlinesWithSpaces(BOOL replace)
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ void LLScreenClipRect::updateScissorRegion()
|
|||
LLRect rect = sClipRectStack.top();
|
||||
stop_glerror();
|
||||
S32 x,y,w,h;
|
||||
x = llfloor(rect.mLeft * LLUI::sGLScaleFactor.mV[VX]);
|
||||
y = llfloor(rect.mBottom * LLUI::sGLScaleFactor.mV[VY]);
|
||||
w = llmax(0, llceil(rect.getWidth() * LLUI::sGLScaleFactor.mV[VX])) + 1;
|
||||
h = llmax(0, llceil(rect.getHeight() * LLUI::sGLScaleFactor.mV[VY])) + 1;
|
||||
x = llfloor(rect.mLeft * LLUI::getScaleFactor().mV[VX]);
|
||||
y = llfloor(rect.mBottom * LLUI::getScaleFactor().mV[VY]);
|
||||
w = llmax(0, llceil(rect.getWidth() * LLUI::getScaleFactor().mV[VX])) + 1;
|
||||
h = llmax(0, llceil(rect.getHeight() * LLUI::getScaleFactor().mV[VY])) + 1;
|
||||
glScissor( x,y,w,h );
|
||||
stop_glerror();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,8 +513,8 @@ void LLTextBase::drawCursor()
|
|||
LLRect screen_pos = calcScreenRect();
|
||||
LLCoordGL ime_pos( screen_pos.mLeft + llfloor(cursor_rect.mLeft), screen_pos.mBottom + llfloor(cursor_rect.mTop) );
|
||||
|
||||
ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]);
|
||||
ime_pos.mY = (S32) (ime_pos.mY * LLUI::sGLScaleFactor.mV[VY]);
|
||||
ime_pos.mX = (S32) (ime_pos.mX * LLUI::getScaleFactor().mV[VX]);
|
||||
ime_pos.mY = (S32) (ime_pos.mY * LLUI::getScaleFactor().mV[VY]);
|
||||
getWindow()->setLanguageTextInput( ime_pos );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2843,7 +2843,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length)
|
|||
|
||||
S32 LLTextEditor::getPreeditFontSize() const
|
||||
{
|
||||
return llround((F32)mDefaultFont->getLineHeight() * LLUI::sGLScaleFactor.mV[VY]);
|
||||
return llround((F32)mDefaultFont->getLineHeight() * LLUI::getScaleFactor().mV[VY]);
|
||||
}
|
||||
|
||||
BOOL LLTextEditor::isDirty() const
|
||||
|
|
|
|||
1579
indra/llui/llui.cpp
1579
indra/llui/llui.cpp
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* @file llui.h
|
||||
* @brief GL function declarations and other general static UI services.
|
||||
* @brief General static UI services.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
|
|
@ -24,122 +24,37 @@
|
|||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
// All immediate-mode gl drawing should happen here.
|
||||
|
||||
#ifndef LL_LLUI_H
|
||||
#define LL_LLUI_H
|
||||
|
||||
#include "llpointer.h" // LLPointer<>
|
||||
#include "llrect.h"
|
||||
#include "llcontrol.h"
|
||||
#include "llcoord.h"
|
||||
#include "llglslshader.h"
|
||||
#include "v2math.h"
|
||||
#include "llinitparam.h"
|
||||
#include "llregistry.h"
|
||||
#include "llrender2dutils.h"
|
||||
#include "llpointer.h"
|
||||
#include "lluicolor.h"
|
||||
#include "lluicolortable.h"
|
||||
#include "lluiimage.h"
|
||||
#include <boost/signals2.hpp>
|
||||
#include "lllazyvalue.h"
|
||||
#include "llframetimer.h"
|
||||
#include <limits>
|
||||
|
||||
// LLUIFactory
|
||||
#include "llsd.h"
|
||||
|
||||
// for initparam specialization
|
||||
#include "llfontgl.h"
|
||||
|
||||
|
||||
class LLColor4;
|
||||
class LLVector3;
|
||||
class LLVector2;
|
||||
class LLUIImage;
|
||||
class LLUUID;
|
||||
class LLWindow;
|
||||
class LLView;
|
||||
class LLHelp;
|
||||
|
||||
// UI colors
|
||||
extern const LLColor4 UI_VERTEX_COLOR;
|
||||
void make_ui_sound(const char* name);
|
||||
|
||||
BOOL ui_point_in_rect(S32 x, S32 y, S32 left, S32 top, S32 right, S32 bottom);
|
||||
void gl_state_for_2d(S32 width, S32 height);
|
||||
|
||||
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2);
|
||||
void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color );
|
||||
void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColor4& color, BOOL filled);
|
||||
void gl_rect_2d_simple( S32 width, S32 height );
|
||||
|
||||
void gl_draw_x(const LLRect& rect, const LLColor4& color);
|
||||
|
||||
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled = TRUE );
|
||||
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, BOOL filled = TRUE );
|
||||
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &color, S32 pixel_offset = 0, BOOL filled = TRUE );
|
||||
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset = 0, BOOL filled = TRUE );
|
||||
void gl_rect_2d(const LLRect& rect, BOOL filled = TRUE );
|
||||
void gl_rect_2d(const LLRect& rect, const LLColor4& color, BOOL filled = TRUE );
|
||||
void gl_rect_2d_checkerboard(const LLRect& rect, GLfloat alpha = 1.0f);
|
||||
|
||||
void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &start_color, S32 lines);
|
||||
|
||||
void gl_circle_2d(F32 x, F32 y, F32 radius, S32 steps, BOOL filled);
|
||||
void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F32 start_angle, F32 end_angle);
|
||||
void gl_deep_circle( F32 radius, F32 depth );
|
||||
void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center );
|
||||
void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max_frac);
|
||||
void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians, F32 end_radians, S32 steps, const LLColor4& inner_color, const LLColor4& outer_color);
|
||||
|
||||
void gl_draw_image(S32 x, S32 y, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees,LLTexture* image, const LLColor4& color = UI_VERTEX_COLOR, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4 &color, BOOL solid_color = FALSE, const LLRectf& uv_rect = LLRectf(0.f, 1.f, 1.f, 0.f), const LLRectf& scale_rect = LLRectf(0.f, 1.f, 1.f, 0.f));
|
||||
|
||||
void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& color, F32 phase = 0.f );
|
||||
|
||||
void gl_rect_2d_simple_tex( S32 width, S32 height );
|
||||
|
||||
// segmented rectangles
|
||||
|
||||
/*
|
||||
TL |______TOP_________| TR
|
||||
/| |\
|
||||
_/_|__________________|_\_
|
||||
L| | MIDDLE | |R
|
||||
_|_|__________________|_|_
|
||||
\ | BOTTOM | /
|
||||
BL\|__________________|/ BR
|
||||
| |
|
||||
*/
|
||||
|
||||
typedef enum e_rounded_edge
|
||||
{
|
||||
ROUNDED_RECT_LEFT = 0x1,
|
||||
ROUNDED_RECT_TOP = 0x2,
|
||||
ROUNDED_RECT_RIGHT = 0x4,
|
||||
ROUNDED_RECT_BOTTOM = 0x8,
|
||||
ROUNDED_RECT_ALL = 0xf
|
||||
}ERoundedEdge;
|
||||
|
||||
|
||||
void gl_segmented_rect_2d_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_2d_fragment_tex(const S32 left, const S32 top, const S32 right, const S32 bottom, const S32 texture_width, const S32 texture_height, const S32 border_size, const F32 start_fragment, const F32 end_fragment, const U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec, U32 edges = ROUNDED_RECT_ALL);
|
||||
void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3& border_width, const LLVector3& border_height, const LLVector3& width_vec, const LLVector3& height_vec);
|
||||
|
||||
inline void gl_rect_2d( const LLRect& rect, BOOL filled )
|
||||
{
|
||||
gl_rect_2d( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, filled );
|
||||
}
|
||||
|
||||
inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, BOOL filled)
|
||||
{
|
||||
gl_rect_2d_offset_local( rect.mLeft, rect.mTop, rect.mRight, rect.mBottom, pixel_offset, filled );
|
||||
}
|
||||
|
||||
class LLImageProviderInterface;
|
||||
|
||||
typedef void (*LLUIAudioCallback)(const LLUUID& uuid);
|
||||
|
|
@ -280,10 +195,10 @@ public:
|
|||
static void cleanupClass();
|
||||
static void setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t&, const clear_popups_t& );
|
||||
|
||||
static void pushMatrix();
|
||||
static void popMatrix();
|
||||
static void loadIdentity();
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f);
|
||||
static void pushMatrix() { LLRender2D::pushMatrix(); }
|
||||
static void popMatrix() { LLRender2D::popMatrix(); }
|
||||
static void loadIdentity() { LLRender2D::loadIdentity(); }
|
||||
static void translate(F32 x, F32 y, F32 z = 0.0f) { LLRender2D::translate(x, y, z); }
|
||||
|
||||
static LLRect sDirtyRect;
|
||||
static BOOL sDirty;
|
||||
|
|
@ -333,10 +248,13 @@ public:
|
|||
static void getMousePositionScreen(S32 *x, S32 *y);
|
||||
static void setMousePositionLocal(const LLView* viewp, S32 x, S32 y);
|
||||
static void getMousePositionLocal(const LLView* viewp, S32 *x, S32 *y);
|
||||
static void setScaleFactor(const LLVector2& scale_factor);
|
||||
static void setLineWidth(F32 width);
|
||||
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0);
|
||||
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0);
|
||||
static LLVector2& getScaleFactor() { return LLRender2D::sGLScaleFactor; }
|
||||
static void setScaleFactor(const LLVector2& scale_factor) { LLRender2D::setScaleFactor(scale_factor); }
|
||||
static void setLineWidth(F32 width) { LLRender2D::setLineWidth(width); }
|
||||
static LLPointer<LLUIImage> getUIImageByID(const LLUUID& image_id, S32 priority = 0)
|
||||
{ return LLRender2D::getUIImageByID(image_id, priority); }
|
||||
static LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority = 0)
|
||||
{ return LLRender2D::getUIImage(name, priority); }
|
||||
static LLVector2 getWindowSize();
|
||||
static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y);
|
||||
static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y);
|
||||
|
|
@ -365,12 +283,10 @@ public:
|
|||
//
|
||||
static settings_map_t sSettingGroups;
|
||||
static LLUIAudioCallback sAudioCallback;
|
||||
static LLVector2 sGLScaleFactor;
|
||||
static LLWindow* sWindow;
|
||||
static LLView* sRootView;
|
||||
static LLHelp* sHelpImpl;
|
||||
private:
|
||||
static LLImageProviderInterface* sImageProvider;
|
||||
static std::vector<std::string> sXUIPaths;
|
||||
static LLFrameTimer sMouseIdleTimer;
|
||||
static add_popup_t sAddPopupFunc;
|
||||
|
|
@ -381,18 +297,6 @@ private:
|
|||
|
||||
// Moved LLLocalClipRect to lllocalcliprect.h
|
||||
|
||||
//RN: maybe this needs to moved elsewhere?
|
||||
class LLImageProviderInterface
|
||||
{
|
||||
protected:
|
||||
LLImageProviderInterface() {};
|
||||
virtual ~LLImageProviderInterface() {};
|
||||
public:
|
||||
virtual LLPointer<LLUIImage> getUIImage(const std::string& name, S32 priority) = 0;
|
||||
virtual LLPointer<LLUIImage> getUIImageByID(const LLUUID& id, S32 priority) = 0;
|
||||
virtual void cleanUp() = 0;
|
||||
};
|
||||
|
||||
class LLCallbackRegistry
|
||||
{
|
||||
public:
|
||||
|
|
@ -603,7 +507,4 @@ namespace LLInitParam
|
|||
};
|
||||
}
|
||||
|
||||
extern LLGLSLShader gSolidColorProgram;
|
||||
extern LLGLSLShader gUIProgram;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "llurlentry_stub.cpp"
|
||||
#include "lltut.h"
|
||||
#include "../lluicolortable.h"
|
||||
#include "../lluiimage.h"
|
||||
#include "lluiimage.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "linden_common.h"
|
||||
|
||||
#include "../llurlmatch.h"
|
||||
#include "../lluiimage.h"
|
||||
#include "lluiimage.h"
|
||||
#include "lltut.h"
|
||||
|
||||
// link seams
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ set(viewer_SOURCE_FILES
|
|||
llinventorybridge.cpp
|
||||
llinventoryfilter.cpp
|
||||
llinventoryfunctions.cpp
|
||||
llinventoryicon.cpp
|
||||
llinventoryitemslist.cpp
|
||||
llinventorylistitem.cpp
|
||||
llinventorymodel.cpp
|
||||
|
|
@ -872,6 +873,7 @@ set(viewer_HEADER_FILES
|
|||
llinventorybridge.h
|
||||
llinventoryfilter.h
|
||||
llinventoryfunctions.h
|
||||
llinventoryicon.h
|
||||
llinventoryitemslist.h
|
||||
llinventorylistitem.h
|
||||
llinventorymodel.h
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ bool LLAppViewer::init()
|
|||
LLUI::initClass(settings_map,
|
||||
LLUIImageList::getInstance(),
|
||||
ui_audio_callback,
|
||||
&LLUI::sGLScaleFactor);
|
||||
&LLUI::getScaleFactor());
|
||||
LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;
|
||||
|
||||
// Setup paths and LLTrans after LLUI::initClass has been called.
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "llcheckboxctrl.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorymodel.h" // for gInventory
|
||||
#include "llfirstuse.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
|
|||
S32 top = llmax(y, mDragStartY);
|
||||
S32 bottom =llmin(y, mDragStartY);
|
||||
|
||||
left = llround((F32) left * LLUI::sGLScaleFactor.mV[VX]);
|
||||
right = llround((F32) right * LLUI::sGLScaleFactor.mV[VX]);
|
||||
top = llround((F32) top * LLUI::sGLScaleFactor.mV[VY]);
|
||||
bottom = llround((F32) bottom * LLUI::sGLScaleFactor.mV[VY]);
|
||||
left = llround((F32) left * LLUI::getScaleFactor().mV[VX]);
|
||||
right = llround((F32) right * LLUI::getScaleFactor().mV[VX]);
|
||||
top = llround((F32) top * LLUI::getScaleFactor().mV[VY]);
|
||||
bottom = llround((F32) bottom * LLUI::getScaleFactor().mV[VY]);
|
||||
|
||||
F32 old_far_plane = LLViewerCamera::getInstance()->getFar();
|
||||
F32 old_near_plane = LLViewerCamera::getInstance()->getNear();
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
#include "llclipboard.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llinventorypanel.h"
|
||||
|
|
@ -1510,7 +1511,7 @@ LLUIImagePtr LLItemBridge::getIcon() const
|
|||
mIsLink);
|
||||
}
|
||||
|
||||
return LLInventoryIcon::getIcon(LLInventoryIcon::ICONNAME_OBJECT);
|
||||
return LLInventoryIcon::getIcon(LLInventoryType::ICONNAME_OBJECT);
|
||||
}
|
||||
|
||||
PermissionMask LLItemBridge::getPermissionMask() const
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct IconEntry : public LLDictionaryEntry
|
|||
};
|
||||
|
||||
class LLIconDictionary : public LLSingleton<LLIconDictionary>,
|
||||
public LLDictionary<LLInventoryIcon::EIconName, IconEntry>
|
||||
public LLDictionary<LLInventoryType::EIconName, IconEntry>
|
||||
{
|
||||
public:
|
||||
LLIconDictionary();
|
||||
|
|
@ -49,48 +49,48 @@ public:
|
|||
|
||||
LLIconDictionary::LLIconDictionary()
|
||||
{
|
||||
addEntry(LLInventoryIcon::ICONNAME_TEXTURE, new IconEntry("Inv_Texture"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_SOUND, new IconEntry("Inv_Sound"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_SCRIPT, new IconEntry("Inv_Script"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_OBJECT, new IconEntry("Inv_Object"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_BODYPART, new IconEntry("Inv_Skin"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot"));
|
||||
addEntry(LLInventoryType::ICONNAME_TEXTURE, new IconEntry("Inv_Texture"));
|
||||
addEntry(LLInventoryType::ICONNAME_SOUND, new IconEntry("Inv_Sound"));
|
||||
addEntry(LLInventoryType::ICONNAME_CALLINGCARD_ONLINE, new IconEntry("Inv_CallingCard"));
|
||||
addEntry(LLInventoryType::ICONNAME_CALLINGCARD_OFFLINE, new IconEntry("Inv_CallingCard"));
|
||||
addEntry(LLInventoryType::ICONNAME_LANDMARK, new IconEntry("Inv_Landmark"));
|
||||
addEntry(LLInventoryType::ICONNAME_LANDMARK_VISITED, new IconEntry("Inv_Landmark"));
|
||||
addEntry(LLInventoryType::ICONNAME_SCRIPT, new IconEntry("Inv_Script"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING, new IconEntry("Inv_Clothing"));
|
||||
addEntry(LLInventoryType::ICONNAME_OBJECT, new IconEntry("Inv_Object"));
|
||||
addEntry(LLInventoryType::ICONNAME_OBJECT_MULTI, new IconEntry("Inv_Object_Multi"));
|
||||
addEntry(LLInventoryType::ICONNAME_NOTECARD, new IconEntry("Inv_Notecard"));
|
||||
addEntry(LLInventoryType::ICONNAME_BODYPART, new IconEntry("Inv_Skin"));
|
||||
addEntry(LLInventoryType::ICONNAME_SNAPSHOT, new IconEntry("Inv_Snapshot"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye"));
|
||||
addEntry(LLInventoryType::ICONNAME_BODYPART_SHAPE, new IconEntry("Inv_BodyShape"));
|
||||
addEntry(LLInventoryType::ICONNAME_BODYPART_SKIN, new IconEntry("Inv_Skin"));
|
||||
addEntry(LLInventoryType::ICONNAME_BODYPART_HAIR, new IconEntry("Inv_Hair"));
|
||||
addEntry(LLInventoryType::ICONNAME_BODYPART_EYES, new IconEntry("Inv_Eye"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_ANIMATION, new IconEntry("Inv_Animation"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_GESTURE, new IconEntry("Inv_Gesture"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_SHIRT, new IconEntry("Inv_Shirt"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_PANTS, new IconEntry("Inv_Pants"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_SHOES, new IconEntry("Inv_Shoe"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_SOCKS, new IconEntry("Inv_Socks"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_JACKET, new IconEntry("Inv_Jacket"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_GLOVES, new IconEntry("Inv_Gloves"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_UNDERSHIRT, new IconEntry("Inv_Undershirt"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_UNDERPANTS, new IconEntry("Inv_Underpants"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_SKIRT, new IconEntry("Inv_Skirt"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_ALPHA, new IconEntry("Inv_Alpha"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_TATTOO, new IconEntry("Inv_Tattoo"));
|
||||
addEntry(LLInventoryType::ICONNAME_ANIMATION, new IconEntry("Inv_Animation"));
|
||||
addEntry(LLInventoryType::ICONNAME_GESTURE, new IconEntry("Inv_Gesture"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_CLOTHING_PHYSICS, new IconEntry("Inv_Physics"));
|
||||
addEntry(LLInventoryType::ICONNAME_CLOTHING_PHYSICS, new IconEntry("Inv_Physics"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkFolder"));
|
||||
addEntry(LLInventoryIcon::ICONNAME_MESH, new IconEntry("Inv_Mesh"));
|
||||
addEntry(LLInventoryType::ICONNAME_LINKITEM, new IconEntry("Inv_LinkItem"));
|
||||
addEntry(LLInventoryType::ICONNAME_LINKFOLDER, new IconEntry("Inv_LinkFolder"));
|
||||
addEntry(LLInventoryType::ICONNAME_MESH, new IconEntry("Inv_Mesh"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_INVALID, new IconEntry("Inv_Invalid"));
|
||||
addEntry(LLInventoryType::ICONNAME_INVALID, new IconEntry("Inv_Invalid"));
|
||||
|
||||
addEntry(LLInventoryIcon::ICONNAME_NONE, new IconEntry("NONE"));
|
||||
addEntry(LLInventoryType::ICONNAME_NONE, new IconEntry("NONE"));
|
||||
}
|
||||
|
||||
LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type,
|
||||
|
|
@ -102,7 +102,7 @@ LLUIImagePtr LLInventoryIcon::getIcon(LLAssetType::EType asset_type,
|
|||
return LLUI::getUIImage(icon_name);
|
||||
}
|
||||
|
||||
LLUIImagePtr LLInventoryIcon::getIcon(EIconName idx)
|
||||
LLUIImagePtr LLInventoryIcon::getIcon(LLInventoryType::EIconName idx)
|
||||
{
|
||||
return LLUI::getUIImage(getIconName(idx));
|
||||
}
|
||||
|
|
@ -112,56 +112,56 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
|
|||
U32 misc_flag,
|
||||
BOOL item_is_multi)
|
||||
{
|
||||
EIconName idx = ICONNAME_OBJECT;
|
||||
LLInventoryType::EIconName idx = LLInventoryType::ICONNAME_OBJECT;
|
||||
if (item_is_multi)
|
||||
{
|
||||
idx = ICONNAME_OBJECT_MULTI;
|
||||
idx = LLInventoryType::ICONNAME_OBJECT_MULTI;
|
||||
return getIconName(idx);
|
||||
}
|
||||
|
||||
switch(asset_type)
|
||||
{
|
||||
case LLAssetType::AT_TEXTURE:
|
||||
idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? ICONNAME_SNAPSHOT : ICONNAME_TEXTURE;
|
||||
idx = (inventory_type == LLInventoryType::IT_SNAPSHOT) ? LLInventoryType::ICONNAME_SNAPSHOT : LLInventoryType::ICONNAME_TEXTURE;
|
||||
break;
|
||||
case LLAssetType::AT_SOUND:
|
||||
idx = ICONNAME_SOUND;
|
||||
idx = LLInventoryType::ICONNAME_SOUND;
|
||||
break;
|
||||
case LLAssetType::AT_CALLINGCARD:
|
||||
idx = (misc_flag != 0) ? ICONNAME_CALLINGCARD_ONLINE : ICONNAME_CALLINGCARD_OFFLINE;
|
||||
idx = (misc_flag != 0) ? LLInventoryType::ICONNAME_CALLINGCARD_ONLINE : LLInventoryType::ICONNAME_CALLINGCARD_OFFLINE;
|
||||
break;
|
||||
case LLAssetType::AT_LANDMARK:
|
||||
idx = (misc_flag != 0) ? ICONNAME_LANDMARK_VISITED : ICONNAME_LANDMARK;
|
||||
idx = (misc_flag != 0) ? LLInventoryType::ICONNAME_LANDMARK_VISITED : LLInventoryType::ICONNAME_LANDMARK;
|
||||
break;
|
||||
case LLAssetType::AT_SCRIPT:
|
||||
case LLAssetType::AT_LSL_TEXT:
|
||||
case LLAssetType::AT_LSL_BYTECODE:
|
||||
idx = ICONNAME_SCRIPT;
|
||||
idx = LLInventoryType::ICONNAME_SCRIPT;
|
||||
break;
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
case LLAssetType::AT_BODYPART:
|
||||
idx = assignWearableIcon(misc_flag);
|
||||
break;
|
||||
case LLAssetType::AT_NOTECARD:
|
||||
idx = ICONNAME_NOTECARD;
|
||||
idx = LLInventoryType::ICONNAME_NOTECARD;
|
||||
break;
|
||||
case LLAssetType::AT_ANIMATION:
|
||||
idx = ICONNAME_ANIMATION;
|
||||
idx = LLInventoryType::ICONNAME_ANIMATION;
|
||||
break;
|
||||
case LLAssetType::AT_GESTURE:
|
||||
idx = ICONNAME_GESTURE;
|
||||
idx = LLInventoryType::ICONNAME_GESTURE;
|
||||
break;
|
||||
case LLAssetType::AT_LINK:
|
||||
idx = ICONNAME_LINKITEM;
|
||||
idx = LLInventoryType::ICONNAME_LINKITEM;
|
||||
break;
|
||||
case LLAssetType::AT_LINK_FOLDER:
|
||||
idx = ICONNAME_LINKFOLDER;
|
||||
idx = LLInventoryType::ICONNAME_LINKFOLDER;
|
||||
break;
|
||||
case LLAssetType::AT_OBJECT:
|
||||
idx = ICONNAME_OBJECT;
|
||||
idx = LLInventoryType::ICONNAME_OBJECT;
|
||||
break;
|
||||
case LLAssetType::AT_MESH:
|
||||
idx = ICONNAME_MESH;
|
||||
idx = LLInventoryType::ICONNAME_MESH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -170,13 +170,13 @@ const std::string& LLInventoryIcon::getIconName(LLAssetType::EType asset_type,
|
|||
}
|
||||
|
||||
|
||||
const std::string& LLInventoryIcon::getIconName(EIconName idx)
|
||||
const std::string& LLInventoryIcon::getIconName(LLInventoryType::EIconName idx)
|
||||
{
|
||||
const IconEntry *entry = LLIconDictionary::instance().lookup(idx);
|
||||
return entry->mName;
|
||||
}
|
||||
|
||||
LLInventoryIcon::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
|
||||
LLInventoryType::EIconName LLInventoryIcon::assignWearableIcon(U32 misc_flag)
|
||||
{
|
||||
const LLWearableType::EType wearable_type = LLWearableType::EType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & misc_flag);
|
||||
return LLWearableType::getIconName(wearable_type);
|
||||
|
|
@ -35,66 +35,20 @@
|
|||
class LLInventoryIcon
|
||||
{
|
||||
public:
|
||||
enum EIconName
|
||||
{
|
||||
ICONNAME_TEXTURE,
|
||||
ICONNAME_SOUND,
|
||||
ICONNAME_CALLINGCARD_ONLINE,
|
||||
ICONNAME_CALLINGCARD_OFFLINE,
|
||||
ICONNAME_LANDMARK,
|
||||
ICONNAME_LANDMARK_VISITED,
|
||||
ICONNAME_SCRIPT,
|
||||
ICONNAME_CLOTHING,
|
||||
ICONNAME_OBJECT,
|
||||
ICONNAME_OBJECT_MULTI,
|
||||
ICONNAME_NOTECARD,
|
||||
ICONNAME_BODYPART,
|
||||
ICONNAME_SNAPSHOT,
|
||||
|
||||
ICONNAME_BODYPART_SHAPE,
|
||||
ICONNAME_BODYPART_SKIN,
|
||||
ICONNAME_BODYPART_HAIR,
|
||||
ICONNAME_BODYPART_EYES,
|
||||
ICONNAME_CLOTHING_SHIRT,
|
||||
ICONNAME_CLOTHING_PANTS,
|
||||
ICONNAME_CLOTHING_SHOES,
|
||||
ICONNAME_CLOTHING_SOCKS,
|
||||
ICONNAME_CLOTHING_JACKET,
|
||||
ICONNAME_CLOTHING_GLOVES,
|
||||
ICONNAME_CLOTHING_UNDERSHIRT,
|
||||
ICONNAME_CLOTHING_UNDERPANTS,
|
||||
ICONNAME_CLOTHING_SKIRT,
|
||||
ICONNAME_CLOTHING_ALPHA,
|
||||
ICONNAME_CLOTHING_TATTOO,
|
||||
|
||||
ICONNAME_ANIMATION,
|
||||
ICONNAME_GESTURE,
|
||||
|
||||
ICONNAME_CLOTHING_PHYSICS,
|
||||
|
||||
ICONNAME_LINKITEM,
|
||||
ICONNAME_LINKFOLDER,
|
||||
ICONNAME_MESH,
|
||||
|
||||
ICONNAME_INVALID,
|
||||
ICONNAME_COUNT,
|
||||
ICONNAME_NONE = -1
|
||||
};
|
||||
|
||||
static const std::string& getIconName(LLAssetType::EType asset_type,
|
||||
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
|
||||
U32 misc_flag = 0, // different meanings depending on item type
|
||||
BOOL item_is_multi = FALSE);
|
||||
static const std::string& getIconName(EIconName idx);
|
||||
static const std::string& getIconName(LLInventoryType::EIconName idx);
|
||||
|
||||
static LLUIImagePtr getIcon(LLAssetType::EType asset_type,
|
||||
LLInventoryType::EType inventory_type = LLInventoryType::IT_NONE,
|
||||
U32 misc_flag = 0, // different meanings depending on item type
|
||||
BOOL item_is_multi = FALSE);
|
||||
static LLUIImagePtr getIcon(EIconName idx);
|
||||
static LLUIImagePtr getIcon(LLInventoryType::EIconName idx);
|
||||
|
||||
protected:
|
||||
static EIconName assignWearableIcon(U32 misc_flag);
|
||||
static LLInventoryType::EIconName assignWearableIcon(U32 misc_flag);
|
||||
};
|
||||
#endif // LL_LLINVENTORYICON_H
|
||||
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
#include "lltextutil.h"
|
||||
|
||||
// newview
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llviewerinventory.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
|
|||
|
||||
if(!getDecoupleTextureSize())
|
||||
{
|
||||
S32 screen_width = llround((F32)getRect().getWidth() * LLUI::sGLScaleFactor.mV[VX]);
|
||||
S32 screen_height = llround((F32)getRect().getHeight() * LLUI::sGLScaleFactor.mV[VY]);
|
||||
S32 screen_width = llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
|
||||
S32 screen_height = llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
|
||||
|
||||
setTextureSize(screen_width, screen_height);
|
||||
}
|
||||
|
|
@ -469,8 +469,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
|
|||
{
|
||||
if(!getDecoupleTextureSize())
|
||||
{
|
||||
S32 screen_width = llround((F32)width * LLUI::sGLScaleFactor.mV[VX]);
|
||||
S32 screen_height = llround((F32)height * LLUI::sGLScaleFactor.mV[VY]);
|
||||
S32 screen_width = llround((F32)width * LLUI::getScaleFactor().mV[VX]);
|
||||
S32 screen_height = llround((F32)height * LLUI::getScaleFactor().mV[VY]);
|
||||
|
||||
// when floater is minimized, these sizes are negative
|
||||
if ( screen_height > 0 && screen_width > 0 )
|
||||
|
|
@ -687,7 +687,7 @@ bool LLMediaCtrl::ensureMediaSourceExists()
|
|||
mMediaSource->addObserver( this );
|
||||
mMediaSource->setBackgroundColor( getBackgroundColor() );
|
||||
mMediaSource->setTrustedBrowser(mTrusted);
|
||||
mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
|
||||
mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );
|
||||
|
||||
if(mClearCache)
|
||||
{
|
||||
|
|
@ -770,7 +770,7 @@ void LLMediaCtrl::draw()
|
|||
{
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
mMediaSource->setPageZoomFactor( LLUI::sGLScaleFactor.mV[ VX ] );
|
||||
mMediaSource->setPageZoomFactor( LLUI::getScaleFactor().mV[ VX ] );
|
||||
|
||||
// scale texture to fit the space using texture coords
|
||||
gGL.getTexUnit(0)->bind(media_texture);
|
||||
|
|
@ -884,14 +884,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
|
|||
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
|
||||
}
|
||||
|
||||
x = llround((F32)x * LLUI::sGLScaleFactor.mV[VX]);
|
||||
x = llround((F32)x * LLUI::getScaleFactor().mV[VX]);
|
||||
if ( ! coords_opengl )
|
||||
{
|
||||
y = llround((F32)(y) * LLUI::sGLScaleFactor.mV[VY]);
|
||||
y = llround((F32)(y) * LLUI::getScaleFactor().mV[VY]);
|
||||
}
|
||||
else
|
||||
{
|
||||
y = llround((F32)(getRect().getHeight() - y) * LLUI::sGLScaleFactor.mV[VY]);
|
||||
y = llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "llviewerinventory.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventorymodel.h"
|
||||
#include "llfloaterinventory.h"
|
||||
#include "llagent.h"
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
#include "llfolderview.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llinventoryfilter.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llpreviewanim.h"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "llbutton.h"
|
||||
#include "lliconctrl.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "llnotifications.h"
|
||||
#include "llviewertexteditor.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1440,7 +1440,7 @@ void render_ui_2d()
|
|||
gGL.pushMatrix();
|
||||
S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2);
|
||||
S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2);
|
||||
gGL.scalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f);
|
||||
gGL.scalef(LLUI::getScaleFactor().mV[0], LLUI::getScaleFactor().mV[1], 1.f);
|
||||
gGL.translatef((F32)half_width, (F32)half_height, 0.f);
|
||||
F32 zoom = gAgentCamera.mHUDCurZoom;
|
||||
gGL.scalef(zoom,zoom,1.f);
|
||||
|
|
@ -1478,10 +1478,10 @@ void render_ui_2d()
|
|||
LLUI::sDirtyRect = last_rect;
|
||||
last_rect = t_rect;
|
||||
|
||||
last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / LLUI::sGLScaleFactor.mV[0]);
|
||||
last_rect.mRight = LLRect::tCoordType(last_rect.mRight / LLUI::sGLScaleFactor.mV[0]);
|
||||
last_rect.mTop = LLRect::tCoordType(last_rect.mTop / LLUI::sGLScaleFactor.mV[1]);
|
||||
last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / LLUI::sGLScaleFactor.mV[1]);
|
||||
last_rect.mLeft = LLRect::tCoordType(last_rect.mLeft / LLUI::getScaleFactor().mV[0]);
|
||||
last_rect.mRight = LLRect::tCoordType(last_rect.mRight / LLUI::getScaleFactor().mV[0]);
|
||||
last_rect.mTop = LLRect::tCoordType(last_rect.mTop / LLUI::getScaleFactor().mV[1]);
|
||||
last_rect.mBottom = LLRect::tCoordType(last_rect.mBottom / LLUI::getScaleFactor().mV[1]);
|
||||
|
||||
LLRect clip_rect(last_rect);
|
||||
|
||||
|
|
|
|||
|
|
@ -2140,7 +2140,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
|
|||
|
||||
calcDisplayScale();
|
||||
|
||||
BOOL display_scale_changed = mDisplayScale != LLUI::sGLScaleFactor;
|
||||
BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
|
||||
LLUI::setScaleFactor(mDisplayScale);
|
||||
|
||||
// update our window rectangle
|
||||
|
|
@ -2346,7 +2346,7 @@ void LLViewerWindow::draw()
|
|||
// scale view by UI global scale factor and aspect ratio correction factor
|
||||
gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
|
||||
|
||||
LLVector2 old_scale_factor = LLUI::sGLScaleFactor;
|
||||
LLVector2 old_scale_factor = LLUI::getScaleFactor();
|
||||
// apply camera zoom transform (for high res screenshots)
|
||||
F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor();
|
||||
S16 sub_region = LLViewerCamera::getInstance()->getZoomSubRegion();
|
||||
|
|
@ -2360,7 +2360,7 @@ void LLViewerWindow::draw()
|
|||
(F32)getWindowHeightScaled() * -(F32)pos_y,
|
||||
0.f);
|
||||
gGL.scalef(zoom_factor, zoom_factor, 1.f);
|
||||
LLUI::sGLScaleFactor *= zoom_factor;
|
||||
LLUI::getScaleFactor() *= zoom_factor;
|
||||
}
|
||||
|
||||
// Draw tool specific overlay on world
|
||||
|
|
@ -2408,7 +2408,7 @@ void LLViewerWindow::draw()
|
|||
LLFontGL::HCENTER, LLFontGL::TOP);
|
||||
}
|
||||
|
||||
LLUI::sGLScaleFactor = old_scale_factor;
|
||||
LLUI::setScaleFactor(old_scale_factor);
|
||||
}
|
||||
LLUI::popMatrix();
|
||||
gGL.popMatrix();
|
||||
|
|
@ -3208,8 +3208,8 @@ void LLViewerWindow::updateLayout()
|
|||
|
||||
void LLViewerWindow::updateMouseDelta()
|
||||
{
|
||||
S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::sGLScaleFactor.mV[VX]);
|
||||
S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::sGLScaleFactor.mV[VY]);
|
||||
S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::getScaleFactor().mV[VX]);
|
||||
S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::getScaleFactor().mV[VY]);
|
||||
|
||||
//RN: fix for asynchronous notification of mouse leaving window not working
|
||||
LLCoordWindow mouse_pos;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "llagentwearables.h"
|
||||
#include "llappearancemgr.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llinventoryicon.h"
|
||||
#include "lltransutil.h"
|
||||
#include "llviewerattachmenu.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ void LLWorldMapView::draw()
|
|||
{
|
||||
// Inform the fetch mechanism of the size we need
|
||||
S32 draw_size = llround(sMapScale);
|
||||
overlayimage->setKnownDrawSize(llround(draw_size * LLUI::sGLScaleFactor.mV[VX]), llround(draw_size * LLUI::sGLScaleFactor.mV[VY]));
|
||||
overlayimage->setKnownDrawSize(llround(draw_size * LLUI::getScaleFactor().mV[VX]), llround(draw_size * LLUI::getScaleFactor().mV[VY]));
|
||||
// Draw something whenever we have enough info
|
||||
if (overlayimage->hasGLTexture())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue