diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 715c70db61..b9adfb41f0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -83,6 +83,10 @@ set(viewer_SOURCE_FILES fslslbridge.cpp fslslbridgerequest.cpp fsradarlistctrl.cpp + lggbeammapfloater.cpp + lggbeammaps.cpp + lggbeamscolors.cpp + lggbeamcolormapfloater.cpp llagent.cpp llagentaccess.cpp llagentcamera.cpp @@ -654,6 +658,10 @@ set(viewer_HEADER_FILES fskeywords.h fslslbridge.h fslslbridgerequest.h + lggbeammapfloater.h + lggbeammaps.h + lggbeamscolors.h + lggbeamcolormapfloater.h llagent.h llagentaccess.h llagentcamera.h diff --git a/indra/newview/app_settings/beams/Angry Face.xml b/indra/newview/app_settings/beams/Angry Face.xml new file mode 100644 index 0000000000..f80191be74 --- /dev/null +++ b/indra/newview/app_settings/beams/Angry Face.xml @@ -0,0 +1,369 @@ + + + data + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -118 + -107 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -107 + -85 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -85 + -63 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -54 + -49 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -18 + -39 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 14 + -37 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 37 + -51 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 66 + -76 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 85 + -103 + + + + color + + 0.4296875 + 0 + 1.5366822481155396e-007 + 1 + + offset + + 0 + 63 + 67 + + + + color + + 0.4296875 + 0 + 1.5366822481155396e-007 + 1 + + offset + + 0 + 63 + 45 + + + + color + + 0.4296875 + 0 + 1.5366822481155396e-007 + 1 + + offset + + 0 + -71 + 61 + + + + color + + 0.4296875 + 0 + 1.5366822481155396e-007 + 1 + + offset + + 0 + -71 + 41 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -2 + 52 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 17 + 71 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 37 + 91 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 62 + 111 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 82 + 125 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -22 + 60 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -39 + 76 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -67 + 101 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -94 + 123 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -123 + 140 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 99 + 143 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Black Smile.xml b/indra/newview/app_settings/beams/Black Smile.xml new file mode 100644 index 0000000000..0e79a2933c --- /dev/null +++ b/indra/newview/app_settings/beams/Black Smile.xml @@ -0,0 +1,219 @@ + + + data + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -141 + -28 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -127 + -52 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -111 + -75 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -89 + -97 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -54 + -115 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -14 + -115 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 23 + -100 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 50 + -83 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 70 + -61 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 91 + -17 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 42 + 104 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 42 + 80 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -85 + 101 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -87 + 75 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Circle.xml b/indra/newview/app_settings/beams/Circle.xml new file mode 100644 index 0000000000..b94d544004 --- /dev/null +++ b/indra/newview/app_settings/beams/Circle.xml @@ -0,0 +1,152 @@ + + + scale + .7 + data + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 0 + 4 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 3.5 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 2 + 3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 0 + -4 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 2 + -3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 3.5 + -2 + + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + -3.5 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + -2 + 3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + -2 + -3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + -3.5 + -2 + + + + + + \ No newline at end of file diff --git a/indra/newview/app_settings/beams/Color Assortment.xml b/indra/newview/app_settings/beams/Color Assortment.xml new file mode 100644 index 0000000000..53e4bc2c4a --- /dev/null +++ b/indra/newview/app_settings/beams/Color Assortment.xml @@ -0,0 +1,504 @@ + + + data + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -142 + -1 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 113 + 88 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 105 + -5 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 7 + -75 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -23 + 129 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -91 + -67 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -90 + 105 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -57 + -85 + + + + color + + 1 + 1 + 0 + 1 + + offset + + 0 + -146 + 52 + + + + color + + 1 + 1 + 0 + 1 + + offset + + 0 + 123 + 51 + + + + color + + 0 + 1 + 1 + 1 + + offset + + 0 + 18 + -11 + + + + color + + 0 + 1 + 1 + 1 + + offset + + 0 + -49 + 52 + + + + color + + 1 + 0 + 0.5 + 1 + + offset + + 0 + 47 + 109 + + + + color + + 1 + 0 + 0.5 + 1 + + offset + + 0 + -71 + 1 + + + + color + + 1 + 0 + 1 + 1 + + offset + + 0 + 27 + 69 + + + + color + + 1 + 0 + 1 + 1 + + offset + + 0 + 93 + -63 + + + + color + + 0.75 + 0.75 + 0.75 + 1 + + offset + + 0 + 51 + 12 + + + + color + + 0.75 + 0.75 + 0.75 + 1 + + offset + + 0 + -138 + 101 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -146 + -104 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + 5 + -105 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -23 + 16 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -101 + 81 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + 99 + 117 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -27 + -5 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -42 + 89 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 58 + -119 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 157 + -109 + + + + color + + 0 + 1 + 0.5 + 1 + + offset + + 0 + 133 + 25 + + + + color + + 0 + 1 + 0.5 + 1 + + offset + + 0 + 169 + 107 + + + + color + + 0 + 1 + 0.5 + 1 + + offset + + 0 + -150 + -72 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -107 + -124 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 163 + -52 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 75 + 132 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Color Wheel.xml b/indra/newview/app_settings/beams/Color Wheel.xml new file mode 100644 index 0000000000..e169e5da0d --- /dev/null +++ b/indra/newview/app_settings/beams/Color Wheel.xml @@ -0,0 +1,249 @@ + + + data + + + color + + 1 + 0.328125 + 0 + 1 + + offset + + 0 + -109 + 57 + + + + color + + 1 + 0.6796875 + 0 + 1 + + offset + + 0 + -82 + 89 + + + + color + + 1 + 0.890625 + 0 + 1 + + offset + + 0 + -43 + 111 + + + + color + + 0.75781238079071045 + 1 + 0 + 1 + + offset + + 0 + -2 + 112 + + + + color + + 0.38281238079071045 + 1 + 0 + 1 + + offset + + 0 + 38 + 97 + + + + color + + 0.17187488079071045 + 1 + 0 + 1 + + offset + + 0 + 67 + 77 + + + + color + + 0 + 1 + 0.20312494039535522 + 1 + + offset + + 0 + 79 + 51 + + + + color + + 0 + 1 + 0.55468744039535522 + 1 + + offset + + 0 + 81 + 13 + + + + color + + 0 + 1.0000001192092896 + 0.99999994039535522 + 1 + + offset + + 0 + 65 + -25 + + + + color + + 0 + 0.76562511920928955 + 1 + 1 + + offset + + 0 + 37 + -51 + + + + color + + 0 + 0.41406261920928955 + 1 + 1 + + offset + + 0 + 6 + -69 + + + + color + + 0 + 0.10937511920928955 + 1 + 1 + + offset + + 0 + -35 + -72 + + + + color + + 0.3125002384185791 + 0 + 1 + 1 + + offset + + 0 + -69 + -52 + + + + color + + 0.6875002384185791 + 0 + 1 + 1 + + offset + + 0 + -91 + -39 + + + + color + + 1 + 0 + 0.82031285762786865 + 1 + + offset + + 0 + -107 + -11 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -120 + 20 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Cross.xml b/indra/newview/app_settings/beams/Cross.xml new file mode 100644 index 0000000000..6a2817d72d --- /dev/null +++ b/indra/newview/app_settings/beams/Cross.xml @@ -0,0 +1,219 @@ + + + scale + .8 + data + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 1 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 3 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 4 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + 1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 0 + 3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + 4 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -1 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -3 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -4 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + -1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + -3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + 4 + + + + \ No newline at end of file diff --git a/indra/newview/app_settings/beams/Fire.xml b/indra/newview/app_settings/beams/Fire.xml new file mode 100644 index 0000000000..0cf37c2a50 --- /dev/null +++ b/indra/newview/app_settings/beams/Fire.xml @@ -0,0 +1,579 @@ + + + data + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -175 + -125 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -154 + -89 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -134 + -43 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -117 + 9 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -113 + 75 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -95 + 25 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -86 + -29 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -79 + -84 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -61 + -60 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -35 + -15 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -14 + 36 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -1 + 85 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 5 + 44 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -5 + -1 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -5 + -55 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 21 + -96 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 47 + -104 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 65 + -68 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 79 + -29 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 87 + 36 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 87 + 76 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 99 + -23 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 115 + -69 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 143 + -111 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -141 + -129 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -125 + -81 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -113 + -47 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -63 + -109 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -46 + -76 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + -33 + -33 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + 62 + -121 + + + + color + + 1 + 0.3515625 + 0 + 1 + + offset + + 0 + 78 + -97 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + -101 + -125 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + -97 + -91 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + -39 + -123 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + -25 + -96 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + 10 + -117 + + + + color + + 1 + 0.1640625 + 0 + 1 + + offset + + 0 + 102 + -111 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Heart.xml b/indra/newview/app_settings/beams/Heart.xml new file mode 100644 index 0000000000..262506c724 --- /dev/null +++ b/indra/newview/app_settings/beams/Heart.xml @@ -0,0 +1,339 @@ + + + data + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 90 + 75 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 75 + 105 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 45 + 120 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 15 + -121 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -95 + 0 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -91 + 75 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -76 + 105 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -46 + 120 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -16 + -121 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 0 + 60 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 0 + -151 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -17 + 92 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 15 + 92 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -30 + 109 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 27 + 109 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 99 + 6 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 104 + 48 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -105 + 34 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -78 + -38 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + -46 + -78 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 46 + -82 + + + + color + + 0 + 1 + 0 + 1 + + offset + + 0 + 75 + -35 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/LGG.xml b/indra/newview/app_settings/beams/LGG.xml new file mode 100644 index 0000000000..65434ed5d9 --- /dev/null +++ b/indra/newview/app_settings/beams/LGG.xml @@ -0,0 +1,324 @@ + + + data + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -163 + 88 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -165 + 51 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -166 + 17 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -166 + -37 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -166 + -75 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -139 + -79 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -105 + -80 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -75 + -81 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 126 + 103 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 86 + 108 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 46 + 87 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 33 + 55 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 26 + 8 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 35 + -35 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 66 + -71 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 99 + -67 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 126 + -61 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 145 + -19 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 143 + 5 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 113 + 1 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 90 + 0 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Orbit Rings.xml b/indra/newview/app_settings/beams/Orbit Rings.xml new file mode 100644 index 0000000000..6a1510486f --- /dev/null +++ b/indra/newview/app_settings/beams/Orbit Rings.xml @@ -0,0 +1,369 @@ + + + data + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -113 + -95 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -126 + -63 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -113 + -8 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -68 + 57 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -8 + 107 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + 39 + 116 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + 66 + 103 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + 68 + 63 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + 44 + -1 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + 7 + -60 + + + + color + + 0.047707695513963699 + 0.002288818359375 + 0.583648681640625 + 1 + + offset + + 0 + -56 + -99 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -128 + 39 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -137 + 93 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -114 + 121 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -54 + 115 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + 111 + -41 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + 110 + -87 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + 64 + -137 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + 11 + -116 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -53 + -59 + + + + color + + 0.00390625 + 0.78680431842803955 + 0.99609375 + 1 + + offset + + 0 + -102 + -5 + + + + color + + 0 + 1 + 1 + 1 + + offset + + 0 + 3 + 86 + + + + color + + 0 + 1 + 1 + 1 + + offset + + 0 + 86 + 5 + + + + color + + 0 + 1 + 1 + 1 + + offset + + 0 + 48 + 46 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Phoenix.xml b/indra/newview/app_settings/beams/Phoenix.xml new file mode 100644 index 0000000000..e03abbdfab --- /dev/null +++ b/indra/newview/app_settings/beams/Phoenix.xml @@ -0,0 +1,249 @@ + + + data + + + color + + .99 + .18 + 0 + 1 + + offset + + 0 + -26 + -27 + + + + color + + .99 + .18 + 0 + 1 + + offset + + 0 + 26 + -27 + + + + color + + .99 + .05 + 0 + 1 + + offset + + 0 + -24 + -80 + + + + color + + .99 + .05 + + 1 + + offset + + 0 + 24 + -80 + + + + color + + .99 + .12 + 0 + 1 + + offset + + 0 + 0 + -51 + + + + color + + .99 + .51 + 0 + 1 + + offset + + 0 + -37 + 107 + + + + color + + .99 + .51 + 0 + 1 + + offset + + 0 + 37 + 107 + + + + color + + .99 + .34 + 0 + 1 + + offset + + 0 + 78 + 38 + + + + color + + .99 + .34 + 0 + 1 + + offset + + 0 + -78 + 38 + + + + color + + .99 + .25 + 0 + 1 + + offset + + 0 + -62 + 4 + + + + color + + .99 + .44 + 0 + 1 + + offset + + 0 + -58 + 76 + + + + color + + .99 + .44 + 0 + 1 + + offset + + 0 + 58 + 76 + + + + color + + .99 + .25 + 0 + 1 + + offset + + 0 + 62 + 4 + + + + color + + 0.8359375 + 0 + 2.989545464515686e-007 + 1 + + offset + + 0 + 0 + -11 + + + + color + + 0.8359375 + 0 + 2.989545464515686e-007 + 1 + + offset + + 0 + 10 + 14 + + + + color + + 0.8359375 + 0 + 2.989545464515686e-007 + 1 + + offset + + 0 + -8 + 21 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Quad Spike.xml b/indra/newview/app_settings/beams/Quad Spike.xml new file mode 100644 index 0000000000..17a4ac4d25 --- /dev/null +++ b/indra/newview/app_settings/beams/Quad Spike.xml @@ -0,0 +1,309 @@ + + + data + + + color + + 0.19531238079071045 + 1 + 0 + 1 + + offset + + 0 + -102 + -1 + + + + color + + 0.19531238079071045 + 1 + 0 + 1 + + offset + + 0 + -139 + 55 + + + + color + + 0.19531238079071045 + 1 + 0 + 1 + + offset + + 0 + -183 + 124 + + + + color + + 0.19531238079071045 + 1 + 0 + 1 + + offset + + 0 + -105 + 85 + + + + color + + 0.19531238079071045 + 1 + 0 + 1 + + offset + + 0 + -37 + 41 + + + + color + + 0.92187488079071045 + 1 + 0 + 1 + + offset + + 0 + -3 + 40 + + + + color + + 0.92187488079071045 + 1 + 0 + 1 + + offset + + 0 + 59 + 84 + + + + color + + 0.92187488079071045 + 1 + 0 + 1 + + offset + + 0 + 130 + 123 + + + + color + + 0.92187488079071045 + 1 + 0 + 1 + + offset + + 0 + 93 + 47 + + + + color + + 0.92187488079071045 + 1 + 0 + 1 + + offset + + 0 + 49 + -12 + + + + color + + 1 + 0.46875 + 0 + 1 + + offset + + 0 + 61 + -43 + + + + color + + 1 + 0.46875 + 0 + 1 + + offset + + 0 + 109 + -87 + + + + color + + 1 + 0.46875 + 0 + 1 + + offset + + 0 + 158 + -131 + + + + color + + 1 + 0.46875 + 0 + 1 + + offset + + 0 + 71 + -108 + + + + color + + 1 + 0.46875 + 0 + 1 + + offset + + 0 + -9 + -71 + + + + color + + 1 + 0 + 3.5762786865234375e-007 + 1 + + offset + + 0 + -49 + -64 + + + + color + + 1 + 0 + 3.5762786865234375e-007 + 1 + + offset + + 0 + -119 + -100 + + + + color + + 1 + 0 + 3.5762786865234375e-007 + 1 + + offset + + 0 + -187 + -125 + + + + color + + 1 + 0 + 3.5762786865234375e-007 + 1 + + offset + + 0 + -141 + -52 + + + + color + + 1 + 0 + 3.5762786865234375e-007 + 1 + + offset + + 0 + -101 + -19 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Solid.xml b/indra/newview/app_settings/beams/Solid.xml new file mode 100644 index 0000000000..fa16ea047d --- /dev/null +++ b/indra/newview/app_settings/beams/Solid.xml @@ -0,0 +1,165 @@ + + + data + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + 0 + 0 + + + + color + + 1 + 1 + 1 + 1 + + offset + + -1 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -2 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -3 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -4 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -5 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -6 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -7 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -8 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -9 + 0 + 0 + + + color + + 1 + 1 + 1 + 1 + + offset + + -10 + 0 + 0 + + + + scale + 2.3 + + diff --git a/indra/newview/app_settings/beams/Spiral.xml b/indra/newview/app_settings/beams/Spiral.xml new file mode 100644 index 0000000000..e0c4ffcec4 --- /dev/null +++ b/indra/newview/app_settings/beams/Spiral.xml @@ -0,0 +1,369 @@ + + + data + + + color + + 1 + 0.2578125 + 0 + 1 + + offset + + 0 + -137 + 32 + + + + color + + 0.994140625 + 0.33013916015625 + 0.005859375 + 1 + + offset + + 0 + -129 + 59 + + + + color + + 0.994140625 + 0.33013916015625 + 0.005859375 + 1 + + offset + + 0 + -109 + 77 + + + + color + + 0.99609375 + 0.6085205078125 + 0.00390625 + 1 + + offset + + 0 + -82 + 92 + + + + color + + 0.99609375 + 0.6085205078125 + 0.00390625 + 1 + + offset + + 0 + -50 + 105 + + + + color + + 0.998046875 + 0.88909912109375 + 0.001953125 + 1 + + offset + + 0 + -22 + 108 + + + + color + + 0.998046875 + 0.88909912109375 + 0.001953125 + 1 + + offset + + 0 + 17 + 109 + + + + color + + 0.80468738079071045 + 1 + 0 + 1 + + offset + + 0 + 47 + 99 + + + + color + + 0.80468738079071045 + 1 + 0 + 1 + + offset + + 0 + 71 + 83 + + + + color + + 0.52343738079071045 + 1 + 0 + 1 + + offset + + 0 + 94 + 52 + + + + color + + 0.52343738079071045 + 1 + 0 + 1 + + offset + + 0 + 97 + 21 + + + + color + + 0.078124880790710449 + 1 + 0 + 1 + + offset + + 0 + 89 + -3 + + + + color + + 0.078124880790710449 + 1 + 0 + 1 + + offset + + 0 + 69 + -28 + + + + color + + 0 + 1 + 0.32031244039535522 + 1 + + offset + + 0 + 39 + -45 + + + + color + + 0 + 1 + 0.32031244039535522 + 1 + + offset + + 0 + 2 + -48 + + + + color + + 0 + 1 + 0.67187494039535522 + 1 + + offset + + 0 + -21 + -29 + + + + color + + 0 + 1 + 0.67187494039535522 + 1 + + offset + + 0 + -25 + 7 + + + + color + + 0 + 0.85937511920928955 + 1 + 1 + + offset + + 0 + -6 + 27 + + + + color + + 0 + 0.85937511920928955 + 1 + 1 + + offset + + 0 + 21 + 32 + + + + color + + 0 + 0.57812511920928955 + 1 + 1 + + offset + + 0 + 38 + 23 + + + + color + + 0 + 0.57812511920928955 + 1 + 1 + + offset + + 0 + 41 + 1 + + + + color + + 0.0078127384185791016 + 0 + 1 + 1 + + offset + + 0 + 26 + -9 + + + + color + + 0.0078127384185791016 + 0 + 1 + 1 + + offset + + 0 + 13 + 5 + + + + color + + 0.7343752384185791 + 0 + 1 + 1 + + offset + + 0 + 23 + 9 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/Square.xml b/indra/newview/app_settings/beams/Square.xml new file mode 100644 index 0000000000..29e9f45a1c --- /dev/null +++ b/indra/newview/app_settings/beams/Square.xml @@ -0,0 +1,218 @@ + + + scale + 1.3 + data + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 2 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 1 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -1 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + 1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + -1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -1 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 1 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + -2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + -1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + 0 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + 1 + + + + \ No newline at end of file diff --git a/indra/newview/app_settings/beams/Star.xml b/indra/newview/app_settings/beams/Star.xml new file mode 100644 index 0000000000..1a66e95450 --- /dev/null +++ b/indra/newview/app_settings/beams/Star.xml @@ -0,0 +1,271 @@ + + + scale + .3 + data + + + color + + 0 + 1.0 + 0 + 1 + + offset + + 0 + 0 + 9 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 1 + 6 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + 3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 4 + 3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 6.5 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 5 + -1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 3.5 + -3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 3.75 + -6 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 4 + -9 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 2 + -7.7 + + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -1 + 6 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + 3.5 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -4 + 3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -6.5 + 2 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -5 + -1 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -3.5 + -3 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -3.75 + -6 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -4 + -9 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + -2 + -7.7 + + + color + + 0 + 1.0 + 0 + 1 + + offset + 0 + 0 + -6.5 + + + + \ No newline at end of file diff --git a/indra/newview/app_settings/beams/USFlag.xml b/indra/newview/app_settings/beams/USFlag.xml new file mode 100644 index 0000000000..ec0977ee28 --- /dev/null +++ b/indra/newview/app_settings/beams/USFlag.xml @@ -0,0 +1,264 @@ + + + data + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -145 + -59 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -44 + -52 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + 86 + -49 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -45 + 27 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + 78 + 29 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -145 + -93 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -34 + -84 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 84 + -77 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -38 + -16 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 78 + -7 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 75 + 57 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -48 + 61 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -92 + 57 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -88 + -5 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -152 + -11 + + + + color + + 0 + 0 + 1 + 1 + + offset + + 0 + -157 + 49 + + + + color + + 1 + 1 + 1 + 1 + + offset + + 0 + -124 + 24 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/YingYang.xml b/indra/newview/app_settings/beams/YingYang.xml new file mode 100644 index 0000000000..c40cf6a430 --- /dev/null +++ b/indra/newview/app_settings/beams/YingYang.xml @@ -0,0 +1,564 @@ + + + data + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -25 + 92 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -53 + 83 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -81 + 65 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -98 + 43 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -103 + 17 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -95 + -7 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -81 + -39 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -61 + -51 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -35 + -39 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -21 + -21 + + + + color + + 0.96484375 + 0.96484375 + 0.96484375 + 1 + + offset + + 0 + -22 + 1 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -53 + -55 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -27 + -56 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 7 + -43 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 25 + -23 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 37 + 4 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 39 + 47 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 29 + 72 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 2 + 87 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -22 + 85 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -39 + 63 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -47 + 47 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -41 + 32 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -27 + 19 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -33 + 13 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -43 + 21 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -57 + 47 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -47 + 68 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -73 + 43 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -70 + 1 + + + + color + + 0.9375 + 0.9375 + 0.9375 + 1 + + offset + + 0 + -45 + -7 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -17 + 5 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -14 + -15 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -17 + -29 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 1 + -8 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + 1 + 35 + + + + color + + 0 + 0 + 0 + 1 + + offset + + 0 + -14 + 53 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beams/ZigZag.xml b/indra/newview/app_settings/beams/ZigZag.xml new file mode 100644 index 0000000000..fe424541aa --- /dev/null +++ b/indra/newview/app_settings/beams/ZigZag.xml @@ -0,0 +1,399 @@ + + + data + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -187 + -56 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -173 + -32 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -155 + -9 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -134 + 22 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -107 + -1 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -85 + -22 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -62 + -45 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -43 + -22 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -27 + -2 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + -10 + 27 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 14 + 7 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 34 + -9 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 49 + -24 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 78 + -4 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 94 + 10 + + + + color + + 1 + 0 + 0 + 1 + + offset + + 0 + 113 + 30 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + -182 + 12 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + -130 + -45 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + -69 + 23 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + 1 + -34 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + 58 + 32 + + + + color + + 0.20584124326705933 + 0.130859375 + 0.869140625 + 1 + + offset + + 0 + 117 + -14 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -139 + 48 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -57 + -70 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + -18 + 62 + + + + color + + 1 + 0.5 + 0 + 1 + + offset + + 0 + 54 + -52 + + + + scale + 0.02 + + diff --git a/indra/newview/app_settings/beamsColors/Cute.xml b/indra/newview/app_settings/beamsColors/Cute.xml new file mode 100644 index 0000000000..697e120718 --- /dev/null +++ b/indra/newview/app_settings/beamsColors/Cute.xml @@ -0,0 +1,10 @@ + + + endHue + 312.72726440429687 + rotateSpeed + 0.64999997615814209 + startHue + 280 + + diff --git a/indra/newview/app_settings/beamsColors/Fire.xml b/indra/newview/app_settings/beamsColors/Fire.xml new file mode 100644 index 0000000000..ffc268439c --- /dev/null +++ b/indra/newview/app_settings/beamsColors/Fire.xml @@ -0,0 +1,10 @@ + + + endHue + 410.90908813476562 + rotateSpeed + 1 + startHue + 360 + + diff --git a/indra/newview/app_settings/beamsColors/Phoenix.xml b/indra/newview/app_settings/beamsColors/Phoenix.xml new file mode 100644 index 0000000000..b9b9f870c0 --- /dev/null +++ b/indra/newview/app_settings/beamsColors/Phoenix.xml @@ -0,0 +1,10 @@ + + + endHue + 398.18182373046875 + rotateSpeed + 0.23000000417232513 + startHue + 350.90908813476562 + + \ No newline at end of file diff --git a/indra/newview/app_settings/beamsColors/Rainbow.xml b/indra/newview/app_settings/beamsColors/Rainbow.xml new file mode 100644 index 0000000000..bbdc324ea4 --- /dev/null +++ b/indra/newview/app_settings/beamsColors/Rainbow.xml @@ -0,0 +1,10 @@ + + + endHue + 360 + rotateSpeed + 1 + startHue + 0 + + diff --git a/indra/newview/app_settings/beamsColors/Water.xml b/indra/newview/app_settings/beamsColors/Water.xml new file mode 100644 index 0000000000..d694a892e3 --- /dev/null +++ b/indra/newview/app_settings/beamsColors/Water.xml @@ -0,0 +1,10 @@ + + + endHue + 243.63636779785156 + rotateSpeed + 2.3299999237060547 + startHue + 176.36363220214844 + + diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ab29a192e4..f2e1501578 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14347,6 +14347,61 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + PhoenixBeamShape + + Comment + Beam file for the shape of your beam + Persist + 1 + Type + String + Value + Phoenix + + PhoenixBeamColorFile + + Comment + Beam file for the shape of your beam + Persist + 1 + Type + String + Value + ===OFF=== + + PhoenixMaxBeamsPerSecond + + Comment + How many selection beam updates to send in a second + Persist + 1 + Type + F32 + Value + 40 + + PhoenixBeamShapeScale + + Comment + How Big You Want to let the beam be + Persist + 1 + Type + F32 + Value + 1.3 + + PhoenixParticleChat + + Comment + Speak Particle Info on channel 9000 + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/lggbeamcolormapfloater.cpp b/indra/newview/lggbeamcolormapfloater.cpp new file mode 100644 index 0000000000..76eb03edb6 --- /dev/null +++ b/indra/newview/lggbeamcolormapfloater.cpp @@ -0,0 +1,415 @@ +/* Copyright (c) 2009 + * + * Greg Hendrickson (LordGregGreg Back). All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "llviewerprecompiledheaders.h" + +#include "lggbeamcolormapfloater.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "llsdutil.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llagent.h" +#include "llfilepicker.h" +#include "llpanel.h" +#include "lliconctrl.h" +#include "llbutton.h" +#include "llcolorswatch.h" +#include "lggbeammaps.h" + + +#include "llsdserialize.h" +#include "panel_prefs_firestorm.h" +#include "lggbeamscolors.h" +#include "llsliderctrl.h" +#include "llfocusmgr.h" + +F32 convertXToHue(S32 place) +{ + return ((place-6)/396.0f)*720.0f; +} + +S32 convertHueToX(F32 place) +{ + return llround((place/720.0f)*396.0f)+6; +} + +F32 hueToRgb1 ( F32 val1In, F32 val2In, F32 valHUeIn ) +{ + if ( valHUeIn < 0.0f ) valHUeIn += 1.0f; + if ( valHUeIn > 1.0f ) valHUeIn -= 1.0f; + if ( ( 6.0f * valHUeIn ) < 1.0f ) return ( val1In + ( val2In - val1In ) * 6.0f * valHUeIn ); + if ( ( 2.0f * valHUeIn ) < 1.0f ) return ( val2In ); + if ( ( 3.0f * valHUeIn ) < 2.0f ) return ( val1In + ( val2In - val1In ) * ( ( 2.0f / 3.0f ) - valHUeIn ) * 6.0f ); + return ( val1In ); +} + +void hslToRgb1 ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut ) +{ + if ( sValIn < 0.00001f ) + { + rValOut = lValIn; + gValOut = lValIn; + bValOut = lValIn; + } + else + { + F32 interVal1; + F32 interVal2; + + if ( lValIn < 0.5f ) + interVal2 = lValIn * ( 1.0f + sValIn ); + else + interVal2 = ( lValIn + sValIn ) - ( sValIn * lValIn ); + + interVal1 = 2.0f * lValIn - interVal2; + + rValOut = hueToRgb1 ( interVal1, interVal2, hValIn + ( 1.f / 3.f ) ); + gValOut = hueToRgb1 ( interVal1, interVal2, hValIn ); + bValOut = hueToRgb1 ( interVal1, interVal2, hValIn - ( 1.f / 3.f ) ); + } +} + + +const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; +const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; +const F32 CONTEXT_FADE_TIME = 0.08f; + +// Correction factors needed after porting from Phoenix +const S32 CORRECTION_X = 0; +const S32 CORRECTION_Y = -40; + +void lggBeamColorMapFloater::onClickSlider(LLUICtrl* crtl, void* userdata) +{ + lggBeamColorMapFloater* self = (lggBeamColorMapFloater*)userdata; + self->fixOrder(); +} + +void lggBeamColorMapFloater::draw() +{ + //set the color of the preview thing + LLColorSwatchCtrl* colorctrl = getChild("BeamColor_Preview"); + LLColor4 bColor = LLColor4(lggBeamMaps::beamColorFromData(myData)); + colorctrl->set(bColor, TRUE); + + //Try draw rectangle attach beam + LLRect swatch_rect; + LLButton* createButton = fspanel->getChild("BeamColor_new"); + + createButton->localRectToOtherView(createButton->getLocalRect(), &swatch_rect, this); + LLRect local_rect = getLocalRect(); + if (gFocusMgr.childHasKeyboardFocus(this) && fspanel->isInVisibleChain() && mContextConeOpacity > 0.001f) + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + LLGLEnable(GL_CULL_FACE); + gGL.begin(LLRender::QUADS); + { + F32 r = bColor.mV[0]; + F32 g = bColor.mV[1]; + F32 b = bColor.mV[2]; + + gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); + gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + + gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); + + gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); + + gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); + } + gGL.end(); + } + + F32 opacity = gSavedSettings.getF32("PickerContextOpacity"); + mContextConeOpacity = lerp(mContextConeOpacity, opacity, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); + + //Draw Base Stuff + LLFloater::draw(); + + //Draw hues and pointers at color + gGL.pushMatrix(); + F32 r, g, b; + LLColor4 output; + for (int i = 0;i <= 720;i++) + { + int hi =i%360; + hslToRgb1((hi/360.0f), 1.0f, 0.5f, r, g, b); + output.set(r, g, b); + + gl_line_2d( + convertHueToX(i) + CORRECTION_X, 201 + CORRECTION_Y, + convertHueToX(i) + CORRECTION_X, 277 + CORRECTION_Y, output); + //convertHueToX(i),161, + //convertHueToX(i),237,output); + + } + S32 X1 = convertHueToX(myData.startHue) + CORRECTION_X; + S32 X2 = convertHueToX(myData.endHue) + CORRECTION_X; + LLFontGL* font = LLFontGL::getFontSansSerifSmall(); + + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(X1 + CORRECTION_X, 238 + CORRECTION_Y,9.0f, (S32)30, false); + + gGL.color4fv(LLColor4::black.mV); + gl_circle_2d(X1 + CORRECTION_X, 238 + CORRECTION_Y,8.0f, (S32)30, false); + + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(X1 + CORRECTION_X, 238 + CORRECTION_Y,7.0f, (S32)30, false); + + gl_line_2d(X1+1 + CORRECTION_X, 210 + CORRECTION_Y, X1+1 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X1-1 + CORRECTION_X, 210 + CORRECTION_Y, X1-1 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X1 + CORRECTION_X, 210 + CORRECTION_Y, X1 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::black); + + gl_line_2d(X1-25 + CORRECTION_X, 238+1 + CORRECTION_Y, X1+25 + CORRECTION_X, 238+1 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X1-25 + CORRECTION_X, 238-1 + CORRECTION_Y, X1+25 + CORRECTION_X, 238-1 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X1-25 + CORRECTION_X, 238 + CORRECTION_Y, X1+25 + CORRECTION_X, 238 + CORRECTION_Y, LLColor4::black); + + font->renderUTF8( + "Start Hue", 0, + X1 + CORRECTION_X, + 212 + CORRECTION_Y, + LLColor4::white, LLFontGL::HCENTER, + LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(X2 + CORRECTION_X, 238 + CORRECTION_Y, 9.0f, (S32)30, false); + + gGL.color4fv(LLColor4::black.mV); + gl_circle_2d(X2 + CORRECTION_X, 238 + CORRECTION_Y, 8.0f, (S32)30, false); + + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(X2 + CORRECTION_X, 238 + CORRECTION_Y, 7.0f, (S32)30, false); + + gl_line_2d(X2+1 + CORRECTION_X, 210 + CORRECTION_Y, X2+1 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X2-1 + CORRECTION_X, 210 + CORRECTION_Y, X2-1 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X2 + CORRECTION_X ,210 + CORRECTION_Y, X2 + CORRECTION_X, 266 + CORRECTION_Y, LLColor4::black); + + gl_line_2d(X2-25 + CORRECTION_X, 238+1 + CORRECTION_Y, X2+25 + CORRECTION_X, 238+1 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X2-25 + CORRECTION_X, 238-1 + CORRECTION_Y, X2+25 + CORRECTION_X, 238-1 + CORRECTION_Y, LLColor4::white); + gl_line_2d(X2-25 + CORRECTION_X, 238 + CORRECTION_Y, X2+25 + CORRECTION_X, 238 + CORRECTION_Y, LLColor4::black); + + font->renderUTF8( + "End Hue", 0, + X2 + CORRECTION_X, + 212 + CORRECTION_Y, + LLColor4::white, LLFontGL::HCENTER, + LLFontGL::BASELINE, LLFontGL::DROP_SHADOW); + + gGL.popMatrix(); + +} + +lggBeamColorMapFloater::~lggBeamColorMapFloater() +{ +} + +lggBeamColorMapFloater::lggBeamColorMapFloater(const LLSD& seed): LLFloater(seed), + mContextConeOpacity(0.0f) +{ +} + +BOOL lggBeamColorMapFloater::postBuild(void) +{ + setCanMinimize(false); + + getChild("BeamColor_Save")->setCommitCallback(boost::bind(&lggBeamColorMapFloater::onClickSave, this)); + getChild("BeamColor_Load")->setCommitCallback(boost::bind(&lggBeamColorMapFloater::onClickLoad, this)); + getChild("BeamColor_Cancel")->setCommitCallback(boost::bind(&lggBeamColorMapFloater::onClickCancel, this)); + + + mColorSlider = getChild("BeamColor_Speed"); + childSetCommitCallback("BeamColor_Speed", onClickSlider, this); + + // Is this still needed??? + //mColorSlider->setCallbackUserData(this); + + fixOrder(); + + return true; +} +BOOL lggBeamColorMapFloater::handleMouseDown(S32 x,S32 y,MASK mask) +{ + //6, 277 + //402 201 + + if (y > (201 + CORRECTION_Y) && y < (277 + CORRECTION_Y)) + { + if (x < (6 + CORRECTION_X)) + { + myData.startHue=0.0f; + } + else if (x > (402 + CORRECTION_X)) + { + myData.endHue=720.0f; + } + else + { + myData.startHue = convertXToHue(x + CORRECTION_X); + } + + fixOrder(); + } + + llinfos << "we got clicked at (" << x << ", " << y << " yay! " << llendl; + + return LLFloater::handleMouseDown(x,y,mask); +} + +BOOL lggBeamColorMapFloater::handleRightMouseDown(S32 x,S32 y,MASK mask) +{ + if (y > (201 + CORRECTION_Y) && y < (277 + CORRECTION_Y)) + { + if (x < (6 + CORRECTION_X)) + { + myData.startHue=0.0f; + } + else if (x > (402 + CORRECTION_X)) + { + myData.endHue=720.0f; + } + else + { + myData.endHue = convertXToHue(x + CORRECTION_X); + } + + fixOrder(); + } + llinfos << "we got right clicked at (" << x << ", " << y << " yay! " << llendl; + + return LLFloater::handleRightMouseDown(x,y,mask); +} + +void lggBeamColorMapFloater::fixOrder() +{ + myData.rotateSpeed = mColorSlider->getValueF32(); + myData.rotateSpeed /= 100.0f; + + if(myData.endHue < myData.startHue) + { + F32 temp = myData.startHue; + myData.startHue = myData.endHue; + myData.endHue = temp; + } +} + + +void lggBeamColorMapFloater::setData(void* data) +{ + fspanel = (PanelPreferenceFirestorm*)data; + if (fspanel) + { + gFloaterView->getParentFloater(fspanel)->addDependentFloater(this); + } +} + +void lggBeamColorMapFloater::update() +{ + +} + +LLSD lggBeamColorMapFloater::getMyDataSerialized() +{ + + return myData.toLLSD(); +} + +void lggBeamColorMapFloater::onClickSave() +{ + LLFilePicker& picker = LLFilePicker::instance(); + + std::string path_name2(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beamsColors", "")); + + std::string filename=path_name2 + "myNewBeamColor.xml"; + if(!picker.getSaveFile( LLFilePicker::FFSAVE_BEAM, filename ) ) + { + return; + } + + filename = path_name2 + gDirUtilp->getBaseFileName(picker.getFirstFile()); + + LLSD main = getMyDataSerialized(); + + llofstream export_file; + export_file.open(filename); + LLSDSerialize::toPrettyXML(main, export_file); + export_file.close(); + + gSavedSettings.setString("PhoenixBeamColorFile", gDirUtilp->getBaseFileName(filename,true)); + + if (fspanel != NULL) + { + fspanel->refreshBeamLists(); + } + closeFloater(); +} + +void lggBeamColorMapFloater::onClickCancel() +{ + closeFloater(); +} + +void lggBeamColorMapFloater::onClickLoad() +{ + LLFilePicker& picker = LLFilePicker::instance(); + if(!picker.getOpenFile(LLFilePicker::FFLOAD_XML)) + { + return; + } + LLSD minedata; + llifstream importer(picker.getFirstFile()); + LLSDSerialize::fromXMLDocument(minedata, importer); + + myData = lggBeamsColors::fromLLSD(minedata); + childSetValue("BeamColor_Speed",/*self->*/myData.rotateSpeed*100); +} + diff --git a/indra/newview/lggbeamcolormapfloater.h b/indra/newview/lggbeamcolormapfloater.h new file mode 100644 index 0000000000..14fb1502e8 --- /dev/null +++ b/indra/newview/lggbeamcolormapfloater.h @@ -0,0 +1,89 @@ +/* Copyright (c) 2009 + * + * Modular Systems All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "llsdutil.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llagent.h" +#include "llfilepicker.h" +#include "llpanel.h" +#include "lliconctrl.h" +#include "llbutton.h" +#include "llcolorswatch.h" + +#include "llsdserialize.h" +#include "panel_prefs_firestorm.h" +#include "lggbeamscolors.h" +#include "llsliderctrl.h" +#include "llfocusmgr.h" + + +//////////////////////////////////////////////////////////////////////////// +// lggBeamMapFloater +class lggBeamColorMapFloater : public LLFloater +{ +public: + lggBeamColorMapFloater(const LLSD& seed); + virtual ~lggBeamColorMapFloater(); + + void fixOrder(); + + BOOL postBuild(void); + BOOL handleMouseDown(S32 x,S32 y,MASK mask); + BOOL handleRightMouseDown(S32 x,S32 y,MASK mask); + void update(); + + void setData(void* data); + + void draw(); + + LLSD getMyDataSerialized(); + + // UI Handlers + static void onClickSlider(LLUICtrl* crtl, void* userdata); + + void onClickSave(); + void onClickLoad(); + void onClickCancel(); + + +protected: + F32 mContextConeOpacity; + PanelPreferenceFirestorm * fspanel; + lggBeamsColors myData; + LLSliderCtrl* mColorSlider; + +}; diff --git a/indra/newview/lggbeammapfloater.cpp b/indra/newview/lggbeammapfloater.cpp new file mode 100644 index 0000000000..5b35bb7216 --- /dev/null +++ b/indra/newview/lggbeammapfloater.cpp @@ -0,0 +1,309 @@ +/* Copyright (c) 2009 + * + * Greg Hendrickson (LordGregGreg Back). All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "llviewerprecompiledheaders.h" + +#include "lggbeammapfloater.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "llsdutil.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llagent.h" +#include "llfilepicker.h" +#include "llpanel.h" +#include "lliconctrl.h" +#include "llbutton.h" +#include "llcolorswatch.h" +#include "lggbeammaps.h" + +#include "llsdserialize.h" +#include "panel_prefs_firestorm.h" +#include "llfocusmgr.h" + +const F32 CONTEXT_CONE_IN_ALPHA = 0.0f; +const F32 CONTEXT_CONE_OUT_ALPHA = 1.f; +const F32 CONTEXT_FADE_TIME = 0.08f; + + +void lggBeamMapFloater::clearPoints() +{ + dots.clear(); +} + +void lggBeamMapFloater::draw() +{ + LLRect swatch_rect; + LLButton* createButton = fspanel->getChild("custom_beam_btn"); + + createButton->localRectToOtherView(createButton->getLocalRect(), &swatch_rect, this); + LLRect local_rect = getLocalRect(); + if (gFocusMgr.childHasKeyboardFocus(this) && createButton->isInVisibleChain() && mContextConeOpacity > 0.001f) + { + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + LLGLEnable(GL_CULL_FACE); + gGL.begin(LLRender::QUADS); + { + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mTop); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); + + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mTop); + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); + + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity); + gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); + gGL.vertex2i(local_rect.mRight, local_rect.mBottom); + gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); + gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom); + gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom); + } + gGL.end(); + } + + F32 opacity = gSavedSettings.getF32("PickerContextOpacity"); + mContextConeOpacity = lerp(mContextConeOpacity, opacity, LLCriticalDamp::getInterpolant(CONTEXT_FADE_TIME)); + + //getChild("beamshape_draw")->setBackgroundColor(getChild("back_color_swatch")->get()); + LLFloater::draw(); + LLRect rec = getChild("beamshape_draw")->getRect(); + + gGL.pushMatrix(); + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(rec.getCenterX(), rec.getCenterY() ,2.0f, (S32)30, false); + gGL.color4fv(LLColor4::black.mV); + gl_circle_2d(rec.getCenterX(), rec.getCenterY(), 30.0f, (S32)30, false); + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(rec.getCenterX(), rec.getCenterY(), 60.0f, (S32)30, false); + gGL.color4fv(LLColor4::black.mV); + gl_circle_2d(rec.getCenterX(), rec.getCenterY(), 90.0f, (S32)30, false); + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(rec.getCenterX(), rec.getCenterY(), 120.0f, (S32)30, false); + + for(int i = 0; i < (int)dots.size(); i++) + { + gGL.color4fv(LLColor4::white.mV); + gl_circle_2d(dots[i].x, dots[i].y, 9.0f, (S32)30, true); + + gGL.color4fv(LLColor4::black.mV); + gl_circle_2d(dots[i].x, dots[i].y, 8.0f, (S32)30, true); + + gGL.color4fv(dots[i].c.mV); + gl_circle_2d(dots[i]. x,dots[i].y, 7.0f, (S32)30, true); + } + gGL.popMatrix(); +} + +lggBeamMapFloater::~lggBeamMapFloater() +{ +} + +lggBeamMapFloater::lggBeamMapFloater(const LLSD& seed): LLFloater(seed), + mContextConeOpacity(0.0f) +{ +} + +BOOL lggBeamMapFloater::postBuild(void) +{ + setCanMinimize(false); + + getChild("beamshape_save")->setCommitCallback(boost::bind(&lggBeamMapFloater::onClickSave, this)); + getChild("beamshape_clear")->setCommitCallback(boost::bind(&lggBeamMapFloater::onClickClear, this)); + getChild("beamshape_load")->setCommitCallback(boost::bind(&lggBeamMapFloater::onClickLoad, this)); + + //getChild("back_color_swatch")->setCommitCallback(onBackgroundChange); + childSetCommitCallback("back_color_swatch", onBackgroundChange, this); + getChild("beam_color_swatch")->setColor(LLColor4::red); + + return true; +} + +BOOL lggBeamMapFloater::handleMouseDown(S32 x,S32 y,MASK mask) +{ + if(y>39 && x>16 && x<394 && y<317) + { + lggPoint a; + a.x=x; + a.y=y; + a.c= getChild("beam_color_swatch")->get(); + dots.push_back(a); + + llinfos << "we got clicked at (" << x << ", " << y << " and color was " << a.c << llendl; + } + + return LLFloater::handleMouseDown(x,y,mask); +} + +void lggBeamMapFloater::setData(void* data) +{ + fspanel = (PanelPreferenceFirestorm*)data; + if (fspanel) + { + gFloaterView->getParentFloater(fspanel)->addDependentFloater(this); + } +} + +BOOL lggBeamMapFloater::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + std::vector newDots; + for(int i = 0; i < (int)dots.size(); i++) + { + if(dist_vec(LLVector2(x,y), LLVector2(dots[i].x,dots[i].y)) < 7) + { + } + else + { + newDots.push_back(dots[i]); + } + + } + dots = newDots; + + return LLFloater::handleMouseDown(x,y,mask); +} + +void lggBeamMapFloater::onBackgroundChange(LLUICtrl* ctrl, void* userdata) +{ + lggBeamMapFloater* self = (lggBeamMapFloater*)userdata; + LLColorSwatchCtrl* cctrl = (LLColorSwatchCtrl*)ctrl; + + if(cctrl) + { + self->getChild("beamshape_draw")->setBackgroundColor(cctrl->get()); + } +} + +void lggBeamMapFloater::update() +{ +} + +LLSD lggBeamMapFloater::getMyDataSerialized() +{ + LLSD out; + LLRect r = getChild("beamshape_draw")->getRect(); + for(int i =0; i<(int)dots.size(); i++) + { + LLSD point; + lggPoint t = dots[i]; + LLVector3 vec = LLVector3((F32)0.0, (F32)t.x, (F32)t.y); + vec -= LLVector3((F32)0.0, (F32)r.getCenterX(), r.getCenterY()); + + point["offset"]= vec.getValue(); + point["color"] = t.c.getValue(); + + out[i]=point; + } + return out; +} + +void lggBeamMapFloater::onClickSave() +{ + LLRect r = getChild("beamshape_draw")->getRect(); + LLFilePicker& picker = LLFilePicker::instance(); + + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beams", "")); + std::string filename=path_name2 + "myNewBeam.xml"; + if(!picker.getSaveFile( LLFilePicker::FFSAVE_BEAM, filename ) ) + { + return; + } + + filename = path_name2 +gDirUtilp->getBaseFileName(picker.getFirstFile()); + + LLSD main; + main["scale"] = 8.0f / (r.getWidth()); + main["data"] = getMyDataSerialized(); + + llofstream export_file; + export_file.open(filename); + LLSDSerialize::toPrettyXML(main, export_file); + export_file.close(); + gSavedSettings.setString("PhoenixBeamShape",gDirUtilp->getBaseFileName(filename,true)); + + if(fspanel) + { + fspanel->refreshBeamLists(); + } +} + +void lggBeamMapFloater::onClickClear() +{ + clearPoints(); +} + +void lggBeamMapFloater::onClickLoad() +{ + LLFilePicker& picker = LLFilePicker::instance(); + if(!picker.getOpenFile( LLFilePicker::FFLOAD_XML ) ) + { + return; + } + + dots.clear(); + LLSD mydata; + llifstream importer(picker.getFirstFile()); + LLSDSerialize::fromXMLDocument(mydata, importer); + LLSD myPicture = mydata["data"]; + F32 scale = (F32)mydata["scale"].asReal(); + + + for(int i = 0; i < myPicture.size(); i++) + { + LLRect rec = getChild("beamshape_draw")->getRect(); + + LLSD beamData = myPicture[i]; + lggPoint p; + LLVector3 vec = LLVector3(beamData["offset"]); + vec *= (scale)/(8.0f/(rec.getWidth())); + LLColor4 color = beamData["color"]; + p.c = color; + p.x = (S32)(vec.mV[VY]+rec.getCenterX()); + p.y = (S32)(vec.mV[VZ]+rec.getCenterY()); + + dots.push_back(p); + } +} diff --git a/indra/newview/lggbeammapfloater.h b/indra/newview/lggbeammapfloater.h new file mode 100644 index 0000000000..51fdc0d33c --- /dev/null +++ b/indra/newview/lggbeammapfloater.h @@ -0,0 +1,95 @@ +/* Copyright (c) 2009 + * + * Modular Systems All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "llviewerprecompiledheaders.h" + +#include "llagentdata.h" +#include "llcommandhandler.h" +#include "llfloater.h" +#include "llsdutil.h" +#include "lluictrlfactory.h" +#include "llviewercontrol.h" +#include "llagent.h" +#include "llfilepicker.h" +#include "llpanel.h" +#include "lliconctrl.h" +#include "llbutton.h" +#include "llcolorswatch.h" + + +#include "llsdserialize.h" +#include "panel_prefs_firestorm.h" +#include "llfocusmgr.h" + + +class lggPoint +{ + public: + S32 x; + S32 y; + LLColor4 c; +}; + +//////////////////////////////////////////////////////////////////////////// +// lggBeamMapFloater +class lggBeamMapFloater : public LLFloater +{ +public: + lggBeamMapFloater(const LLSD& seed); + virtual ~lggBeamMapFloater(); + + + BOOL postBuild(void); + BOOL handleMouseDown(S32 x,S32 y,MASK mask); + void update(); + BOOL handleRightMouseDown(S32 x,S32 y,MASK mask); + + void setData(void* data); + PanelPreferenceFirestorm* fspanel; + + void draw(); + void clearPoints(); + + LLSD getMyDataSerialized(); + + std::vector dots; + + // UI Handlers + void onClickSave(); + void onClickClear(); + void onClickLoad(); + + +private: + static void onBackgroundChange(LLUICtrl* ctrl, void* userdata); + + F32 mContextConeOpacity; +}; diff --git a/indra/newview/lggbeammaps.cpp b/indra/newview/lggbeammaps.cpp new file mode 100644 index 0000000000..dd7398cffc --- /dev/null +++ b/indra/newview/lggbeammaps.cpp @@ -0,0 +1,433 @@ +/* Copyright (c) 2009 + * + * Greg Hendrickson (LordGregGreg Back) All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "llviewerprecompiledheaders.h" +#include "lggbeammaps.h" +#include "lggbeamscolors.h" +#include "llappviewer.h" +#include "llfile.h" +#include "llagent.h" +#include "llsdserialize.h" +#include "llviewercontrol.h" +#include "llhudeffecttrail.h" +#include "llhudmanager.h" +//using namespace std; + +#include "message.h" +#include + +lggBeamMaps gLggBeamMaps; +F32 hueToRgb ( F32 val1In, F32 val2In, F32 valHUeIn ) +{ + while ( valHUeIn < 0.0f ) valHUeIn += 1.0f; + while ( valHUeIn > 1.0f ) valHUeIn -= 1.0f; + if ( ( 6.0f * valHUeIn ) < 1.0f ) return ( val1In + ( val2In - val1In ) * 6.0f * valHUeIn ); + if ( ( 2.0f * valHUeIn ) < 1.0f ) return ( val2In ); + if ( ( 3.0f * valHUeIn ) < 2.0f ) return ( val1In + ( val2In - val1In ) * ( ( 2.0f / 3.0f ) - valHUeIn ) * 6.0f ); + return ( val1In ); +} + +void hslToRgb ( F32 hValIn, F32 sValIn, F32 lValIn, F32& rValOut, F32& gValOut, F32& bValOut ) +{ + if ( sValIn < 0.00001f ) + { + rValOut = lValIn; + gValOut = lValIn; + bValOut = lValIn; + } + else + { + F32 interVal1; + F32 interVal2; + + if ( lValIn < 0.5f ) + interVal2 = lValIn * ( 1.0f + sValIn ); + else + interVal2 = ( lValIn + sValIn ) - ( sValIn * lValIn ); + + interVal1 = 2.0f * lValIn - interVal2; + + rValOut = hueToRgb ( interVal1, interVal2, hValIn + ( 1.f / 3.f ) ); + gValOut = hueToRgb ( interVal1, interVal2, hValIn ); + bValOut = hueToRgb ( interVal1, interVal2, hValIn - ( 1.f / 3.f ) ); + } +} + + + +LLSD lggBeamMaps::getPic(std::string filename) +{ + LLSD data; + llifstream importer(filename); + LLSDSerialize::fromXMLDocument(data, importer); + + return data; + +} +LLColor4U lggBeamMaps::getCurrentColor(LLColor4U agentColor) +{ + //static std::string* settingName = rebind_llcontrol("PhoenixBeamColorFile", &gSavedSettings, true); + std::string settingName = gSavedSettings.getString("PhoenixBeamColorFile"); + + if(settingName == "===OFF===") return agentColor; + + if(settingName != lastColorFileName) + { + lastColorFileName = settingName; + + std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beamsColors", "")); + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beamsColors", "")); + std::string filename = path_name + settingName + ".xml"; + if(gDirUtilp->fileExists(filename)) + { + }else + { + filename = path_name2 + settingName + ".xml"; + if(!gDirUtilp->fileExists(filename)) + { + return agentColor; + } + } + + lastColorsData = lggBeamsColors::fromLLSD(getPic(filename)); + } + agentColor = beamColorFromData(lastColorsData); + + return agentColor; +} + +static LLFrameTimer timer; +LLColor4U lggBeamMaps::beamColorFromData(lggBeamsColors data) +{ + + F32 r, g, b; + LLColor4 output; + LLColor4U toReturn; + F32 timeinc = timer.getElapsedTimeF32()*0.3f*((data.rotateSpeed+.01f)) * (360/(data.endHue-data.startHue)); + + S32 diference = llround(data.endHue - data.startHue); + if(diference == 360 || diference == 720) + { + //full rainbow + //liner one + hslToRgb(fmod(timeinc,1.0f), 1.0f, 0.5f, r, g, b); + + }else + { + F32 variance = ((data.endHue/360.0f)-(data.startHue/360.0f))/2.0f; + hslToRgb((data.startHue/360.0f) + variance + (sinf(timeinc)*(variance)), 1.0f, 0.5f, r, g, b); + } + output.set(r, g, b); + + toReturn.setVecScaleClamp(output); + return toReturn; + +} +void lggBeamMaps::fireCurrentBeams(LLPointer mBeam, LLColor4U rgb) +{ + if(scale == 0.0f) return; + + static LLCachedControl colorf(gSavedSettings, "PhoenixBeamColorFile"); + bool colorsDisabled = std::string(colorf) == "===OFF==="; + + for(int i = 0; i < (int)dots.size(); i++) + { + LLColor4U myColor = rgb; + if (colorsDisabled) myColor = dots[i].c; + + F32 distanceAdjust = dist_vec(mBeam->getPositionGlobal(),gAgent.getPositionGlobal()) ; + F32 pulse = (F32)(.75f+sinf(gFrameTimeSeconds*1.0f)*0.25f); + LLVector3d offset = dots[i].p; + offset.mdV[VY] *= -1; + offset *= pulse * scale * distanceAdjust * 0.1; + + //llinfos << "dist is " << distanceAdjust << "scale is " << scale << llendl; + LLVector3 beamLine = LLVector3( mBeam->getPositionGlobal() - gAgent.getPositionGlobal()); + LLVector3 beamLineFlat = beamLine; + beamLineFlat.mV[VZ]= 0.0f; + + LLVector3 newDirFlat = LLVector3::x_axis; + beamLine.normalize(); + beamLineFlat.normalize(); + LLQuaternion change; + change.shortestArc(newDirFlat,beamLineFlat); + offset.rotVec(change); + newDirFlat.rotVec(change); + change.shortestArc(newDirFlat,beamLine); + offset.rotVec(change); + + LLPointer myBeam = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM); + myBeam->setPositionGlobal(mBeam->getPositionGlobal() + offset + (LLVector3d(beamLine) * sinf(gFrameTimeSeconds*2.0f) * 0.2f)); + + myBeam->setColor(myColor); + myBeam->setTargetObject(mBeam->getTargetObject()); + myBeam->setSourceObject(mBeam->getSourceObject()); + myBeam->setNeedsSendToSim(mBeam->getNeedsSendToSim()); + myBeam->setDuration(duration* 1.2f); + } +} +void lggBeamMaps::forceUpdate() +{ + dots.clear(); + scale = 0.0f; + lastFileName=""; +} +F32 lggBeamMaps::setUpAndGetDuration() +{ + static LLCachedControl settingNameCached(gSavedSettings, "PhoenixBeamShape"); + std::string settingName(settingNameCached); + if(settingName != lastFileName) + { + lastFileName = settingName; + if( settingName != "===OFF===" && settingName != "") + { + + std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beams", "")); + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beams", "")); + std::string filename = path_name + settingName + ".xml"; + if(gDirUtilp->fileExists(filename)) + { + }else + { + filename =path_name2 + settingName +".xml"; + } + LLSD mydata = getPic(filename); + scale = (F32)mydata["scale"].asReal()/10.0f; + LLSD myPicture = mydata["data"]; + dots.clear(); + for(int i = 0; i < myPicture.size(); i++) + { + LLSD beamData = myPicture[i]; + lggBeamData dot; + + dot.p = LLVector3d(beamData["offset"]); + dot.p *= (gSavedSettings.getF32("PhoenixBeamShapeScale")*2.0f); + LLColor4 color = beamData["color"]; + + dot.c = LLColor4U(color); + + dots.push_back(dot); + } + + F32 maxBPerQS = gSavedSettings.getF32("PhoenixMaxBeamsPerSecond") / 4.0f; + duration = llceil((F32)(myPicture.size()) / maxBPerQS) * 0.25f; + llinfos << "reading it all now size is " << myPicture.size() << " and duration is " << duration << llendl; + + }else + { + dots.clear(); + scale = 0.0f;//used as a flag too + duration = 0.25f; + } + + } + //llinfos << "sent final dur of " << duration << llendl; + + return duration; + +} + + +std::vector lggBeamMaps::getFileNames() +{ + + std::vector names; + std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beams", "")); + bool found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name); + if(found) + { + + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + names.push_back(name); + + //LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + //loadPreset(unescaped_name,FALSE); + } + } + std::string path_name2(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beams", "")); + found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name); + if(found) + { + + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + names.push_back(name); + + //LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + //loadPreset(unescaped_name,FALSE); + } + } + return names; + + + +} + +std::vector lggBeamMaps::getColorsFileNames() +{ + + std::vector names; + std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "beamsColors", "")); + bool found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name); + if(found) + { + + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + names.push_back(name); + + //LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + //loadPreset(unescaped_name,FALSE); + } + } + std::string path_name2(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beamsColors", "")); + found = true; + while(found) + { + std::string name; + found = gDirUtilp->getNextFileInDir(path_name2, "*.xml", name); + if(found) + { + + name=name.erase(name.length()-4); + + // bugfix for SL-46920: preventing filenames that break stuff. + char * curl_str = curl_unescape(name.c_str(), name.size()); + std::string unescaped_name(curl_str); + curl_free(curl_str); + curl_str = NULL; + + names.push_back(name); + + //LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL; + //loadPreset(unescaped_name,FALSE); + } + } + return names; + + + +} +void lggBeamMaps::stopBeamChat() +{ + if(gSavedSettings.getBOOL("PhoenixParticleChat")) + { + if(sPartsNow != FALSE) + { + sPartsNow = FALSE; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, "stop"); + msg->addU8Fast(_PREHASH_Type, 0); + msg->addS32("Channel", 9000); + + gAgent.sendReliableMessage(); + sBeamLastAt = LLVector3d::zero; + } + } +} +void lggBeamMaps::updateBeamChat(LLVector3d currentPos) +{ + if(gSavedSettings.getBOOL("PhoenixParticleChat")) + { + if(sPartsNow != TRUE) + { + sPartsNow = TRUE; + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, "start"); + msg->addU8Fast(_PREHASH_Type, 0); + msg->addS32("Channel", 9000); + + gAgent.sendReliableMessage(); + } + //LLVector3d a = sBeamLastAt-gAgent.mPointAt->getPointAtPosGlobal(); + //if(a.length > 2) + if( (sBeamLastAt-currentPos).length() > .2) + //if(sBeamLastAt!=gAgent.mPointAt->getPointAtPosGlobal()) + { + sBeamLastAt = currentPos; + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_ChatFromViewer); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_ChatData); + msg->addStringFast(_PREHASH_Message, llformat("<%.6f, %.6f, %.6f>",(F32)(sBeamLastAt.mdV[VX]),(F32)(sBeamLastAt.mdV[VY]),(F32)(sBeamLastAt.mdV[VZ]))); + msg->addU8Fast(_PREHASH_Type, 0); + msg->addS32("Channel", 9000); // *TODO: make configurable + + gAgent.sendReliableMessage(); + } + + } +} + diff --git a/indra/newview/lggbeammaps.h b/indra/newview/lggbeammaps.h new file mode 100644 index 0000000000..ea7fd0dd29 --- /dev/null +++ b/indra/newview/lggbeammaps.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2009 + * + * Greg Hendrickson (LordGregGreg Back) All rights reserved. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. Neither the name Modular Systems nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + + +#include "llhudeffecttrail.h" +#include "llviewerprecompiledheaders.h" +#include "lggbeamscolors.h" +#include "llframetimer.h" +class lggBeamData +{ + public: + LLVector3d p; + LLColor4U c; + +}; +class lggBeamMaps +{ + public: + lggBeamMaps():lastFileName(""),scale(0.0f),duration(0.25f),sPartsNow(FALSE),sBeamLastAt(LLVector3d::zero){} + ~lggBeamMaps() {} + public: + F32 setUpAndGetDuration(); + void fireCurrentBeams(LLPointer, LLColor4U rgb); + void forceUpdate(); + static LLColor4U beamColorFromData(lggBeamsColors data); + LLColor4U getCurrentColor(LLColor4U agentColor); + std::vector getFileNames(); + std::vector getColorsFileNames(); + void stopBeamChat(); + void updateBeamChat(LLVector3d currentPos); + private: + LLSD getPic(std::string filename); + std::string lastFileName; + std::string lastColorFileName; + BOOL sPartsNow; + LLVector3d sBeamLastAt; + lggBeamsColors lastColorsData; + F32 duration; + F32 scale; + std::vector dots; +}; + + +extern lggBeamMaps gLggBeamMaps; diff --git a/indra/newview/lggbeamscolors.cpp b/indra/newview/lggbeamscolors.cpp new file mode 100644 index 0000000000..7b2205db15 --- /dev/null +++ b/indra/newview/lggbeamscolors.cpp @@ -0,0 +1,78 @@ +/* Copyright (c) 2009 +* +* Greg Hendrickson (LordGregGreg Back). All rights reserved. +* +* Redistribution and use in source and binary forms, with or +* without modification, are permitted provided that the following +* conditions are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* 3. Neither the name Modular Systems nor the names of its contributors +* may be used to endorse or promote products derived from this +* software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS "AS IS" +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +* THE POSSIBILITY OF SUCH DAMAGE. +*/ + +//////////////////////////////////////////////////// +//////////////DATA TYPE///////////////////////////// + +#include "llviewerprecompiledheaders.h" +#include "lggbeamscolors.h" + +lggBeamsColors lggBeamsColors::fromLLSD(LLSD inputData) +{ + + lggBeamsColors toReturn; + + if(inputData.has("startHue")) toReturn.startHue = (F32)inputData["startHue"].asReal(); + if(inputData.has("endHue")) toReturn.endHue = (F32)inputData["endHue"].asReal(); + if(inputData.has("rotateSpeed")) toReturn.rotateSpeed = (F32)inputData["rotateSpeed"].asReal(); + + return toReturn; +} +LLSD lggBeamsColors::toLLSD() +{ + + LLSD out; + out["startHue"]=startHue; + out["endHue"]=endHue; + out["rotateSpeed"]=rotateSpeed; + return out; +} + +std::string lggBeamsColors::toString() +{ + + return llformat("Start Hue %d\nEnd Hue is %d\nRotate Speed is %d", + startHue,endHue,rotateSpeed + + ); +} +lggBeamsColors::lggBeamsColors(F32 istartHue, F32 iendHue, F32 irotateSpeed): +startHue(istartHue),endHue(iendHue),rotateSpeed(irotateSpeed) +{ +} +lggBeamsColors::lggBeamsColors(): +startHue(0.0f),endHue(360.0f),rotateSpeed(1.0f) +{ +} +lggBeamsColors::~lggBeamsColors() +{ + +} diff --git a/indra/newview/lggbeamscolors.h b/indra/newview/lggbeamscolors.h new file mode 100644 index 0000000000..21e543bc58 --- /dev/null +++ b/indra/newview/lggbeamscolors.h @@ -0,0 +1,61 @@ +/* Copyright (c) 2009 +* +* Greg Hendrickson (LordGregGreg Back). All rights reserved. +* +* Redistribution and use in source and binary forms, with or +* without modification, are permitted provided that the following +* conditions are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* 3. Neither the name Modular Systems nor the names of its contributors +* may be used to endorse or promote products derived from this +* software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS “AS IS” +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +* THE POSSIBILITY OF SUCH DAMAGE. +*/ +#ifndef LGGBEAMCOLORDATA +#define LGGBEAMCOLORDATA + +#include "llviewerprecompiledheaders.h" + +#include "llfile.h" +#include "llsdserialize.h" + +class lggBeamsColors +{ +public: + lggBeamsColors( + F32 istartHue, + F32 iendHue, + F32 irotateSpeed); + lggBeamsColors(); + + ~lggBeamsColors(); + + F32 startHue; + F32 endHue; + F32 rotateSpeed; +public: + LLSD toLLSD(); + static lggBeamsColors fromLLSD(LLSD inputData); + + std::string toString(); + // List sorted by name. +}; + +#endif diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 51e76bcf9b..aa6b0db318 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -480,6 +480,16 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename) L"Compressed Images (*.j2c)\0*.j2c\0" \ L"\0"; break; + case FFSAVE_BEAM: + if (filename.empty()) + { + wcsncpy( mFilesW,L"untitled.xml", FILENAME_BUFFER_SIZE); /*Flawfinder: ignore*/ + } + mOFN.lpstrDefExt = L"xml"; + mOFN.lpstrFilter = + L"XML File (*.xml)\0*.xml\0" \ + L"\0"; + break; default: return FALSE; } diff --git a/indra/newview/llfilepicker.h b/indra/newview/llfilepicker.h index 596bfa3e69..983d04ed5d 100644 --- a/indra/newview/llfilepicker.h +++ b/indra/newview/llfilepicker.h @@ -101,6 +101,7 @@ public: FFSAVE_J2C = 12, FFSAVE_PNG = 13, FFSAVE_JPEG = 14, + FFSAVE_BEAM = 15, }; // open the dialog. This is a modal operation diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3099e35948..567733cfc1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -379,6 +379,13 @@ bool idle_startup() gViewerWindow->showCursor(); gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); + std::string beamsFolder(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beams","")); + LLFile::mkdir(beamsFolder.c_str()); + + std::string beamsColorsFolder(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "beamsColors","")); + LLFile::mkdir(beamsColorsFolder.c_str()); + + ///////////////////////////////////////////////// // // Initialize stuff that doesn't need data from simulators diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index be2aa9841f..3633952354 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -34,6 +34,8 @@ #include "ao.h" // ## Zi: Animation Overrider #include "kvfloaterflickrauth.h" #include "kvfloaterflickrupload.h" +#include "lggbeamcolormapfloater.h" +#include "lggbeammapfloater.h" #include "llcompilequeue.h" #include "llcallfloater.h" #include "llfloaterabout.h" @@ -117,7 +119,7 @@ #include "llnearbychat.h" #include "llpanelblockedlist.h" #include "llpanelclassified.h" -//-TT - Patch : ShowGroupFloaters +//-TT - Patch : ShowGroupFloaters #include "llpanelgroup.h" //-TT // [SL:KB] - Patch : UI-ProfileGroupFloater @@ -182,8 +184,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("env_windlight", "floater_windlight_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("event", "floater_event.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); -//-TT - Patch : ShowGroupFloaters - LLFloaterReg::add("floater_group_view", "floater_group_view.xml",&LLFloaterReg::build); +//-TT - Patch : ShowGroupFloaters + LLFloaterReg::add("floater_group_view", "floater_group_view.xml",&LLFloaterReg::build); //-TT // [SL:KB] - Patch : UI-ProfileGroupFloater | Checked: 2010-09-08 (Catznip-2.1.2c) | Added: Catznip-2.1.2c LLFloaterReg::add("floater_profile_view", "floater_profile_view.xml",&LLFloaterReg::build); @@ -215,7 +217,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("lagmeter", "floater_lagmeter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("land_holdings", "floater_land_holdings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - + + LLFloaterReg::add("lgg_beamcolormap", "floater_beamcolor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("lgg_beamshape", "floater_beamshape.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("mem_leaking", "floater_mem_leaking.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("media_browser", "floater_media_browser.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("media_lists", "floater_media_lists.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 607ad23d80..484a68b92d 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -67,6 +67,7 @@ //-TT Client LSL Bridge #include "fslslbridge.h" //-TT +#include "lggbeammaps.h" #if LL_MSVC // disable boost::lexical_cast warning @@ -1015,10 +1016,13 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) //virtual void LLVOAvatarSelf::idleUpdateTractorBeam() { + LLColor4U rgb = gLggBeamMaps.getCurrentColor(LLColor4U(gAgent.getEffectColor())); + // This is only done for yourself (maybe it should be in the agent?) if (!needsRenderBeam() || !mIsBuilt) { mBeam = NULL; + gLggBeamMaps.stopBeamChat(); } else if (!mBeam || mBeam->isDead()) { @@ -1037,6 +1041,7 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() { // get point from pointat effect mBeam->setPositionGlobal(gAgentCamera.mPointAt->getPointAtPosGlobal()); + gLggBeamMaps.updateBeamChat(gAgentCamera.mPointAt->getPointAtPosGlobal()); mBeam->triggerLocal(); } else if (selection->getFirstRootObject() && @@ -1067,11 +1072,12 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() } } - if (mBeamTimer.getElapsedTimeF32() > 0.25f) + if (mBeamTimer.getElapsedTimeF32() > gLggBeamMaps.setUpAndGetDuration()) { mBeam->setColor(LLColor4U(gAgent.getEffectColor())); mBeam->setNeedsSendToSim(TRUE); mBeamTimer.reset(); + gLggBeamMaps.fireCurrentBeams(mBeam,rgb ); } } } diff --git a/indra/newview/panel_prefs_firestorm.cpp b/indra/newview/panel_prefs_firestorm.cpp index 70c2387428..110901fdd3 100644 --- a/indra/newview/panel_prefs_firestorm.cpp +++ b/indra/newview/panel_prefs_firestorm.cpp @@ -1,7 +1,12 @@ /*${License blank}*/ #include "llviewerprecompiledheaders.h" #include "panel_prefs_firestorm.h" - +#include "llcombobox.h" +#include "llviewercontrol.h" +#include "llfloaterreg.h" +#include "lggbeammaps.h" +#include "lggbeammapfloater.h" +#include "lggbeamcolormapfloater.h" static LLRegisterPanelClassWrapper t_pref_fs("panel_preference_firestorm"); @@ -9,9 +14,22 @@ PanelPreferenceFirestorm::PanelPreferenceFirestorm() : LLPanelPreference(), m_ca { } - BOOL PanelPreferenceFirestorm::postBuild() { + // LGG's Color Beams + refreshBeamLists(); + + // Beam Colors + getChild("BeamColor_new")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamColor_new, this)); + getChild("BeamColor_refresh")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::refreshBeamLists, this)); + getChild("BeamColor_delete")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamColorDelete, this)); + + // Beam Shapes + getChild("custom_beam_btn")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeam_new, this)); + getChild("refresh_beams")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::refreshBeamLists, this)); + getChild("delete_beam")->setCommitCallback(boost::bind(&PanelPreferenceFirestorm::onBeamDelete, this)); + + // m_calcLineEditor = getChild("PhoenixCmdLineCalc"); m_acLineEditor = getChild("PhoenixCmdLineAutocorrect"); m_tp2LineEditor = getChild("PhoenixCmdLineTP2"); @@ -53,3 +71,93 @@ void PanelPreferenceFirestorm::apply() void PanelPreferenceFirestorm::cancel() { } + +void PanelPreferenceFirestorm::refreshBeamLists() +{ + LLComboBox* comboBox = getChild("PhoenixBeamShape_combo"); + + if(comboBox != NULL) + { + comboBox->removeall(); + comboBox->add("===OFF==="); + std::vector names = gLggBeamMaps.getFileNames(); + for(int i=0; i<(int)names.size(); i++) + { + comboBox->add(names[i]); + } + comboBox->setSimple(gSavedSettings.getString("PhoenixBeamShape")); + } + + comboBox = getChild("BeamColor_combo"); + if(comboBox != NULL) + { + comboBox->removeall(); + comboBox->add("===OFF==="); + std::vector names = gLggBeamMaps.getColorsFileNames(); + for(int i=0; i<(int)names.size(); i++) + { + comboBox->add(names[i]); + } + comboBox->setSimple(gSavedSettings.getString("PhoenixBeamColorFile")); + } +} + +void PanelPreferenceFirestorm::onBeamColor_new() +{ + lggBeamColorMapFloater* colorMapFloater = (lggBeamColorMapFloater*)LLFloaterReg::showInstance("lgg_beamcolormap"); + colorMapFloater->setData(this); +} + +void PanelPreferenceFirestorm::onBeam_new() +{ + lggBeamMapFloater* beamMapFloater = (lggBeamMapFloater*)LLFloaterReg::showInstance("lgg_beamshape"); + beamMapFloater->setData(this); +} + +void PanelPreferenceFirestorm::onBeamColorDelete() +{ + LLComboBox* comboBox = getChild("BeamColor_combo"); + + if(comboBox != NULL) + { + std::string filename = comboBox->getValue().asString()+".xml"; + std::string path_name1(gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS , "beamsColors", filename)); + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beamsColors", filename)); + + if(gDirUtilp->fileExists(path_name1)) + { + LLFile::remove(path_name1); + gSavedSettings.setString("PhoenixBeamColorFile","===OFF==="); + } + if(gDirUtilp->fileExists(path_name2)) + { + LLFile::remove(path_name2); + gSavedSettings.setString("PhoenixBeamColorFile","===OFF==="); + } + } + refreshBeamLists(); +} + +void PanelPreferenceFirestorm::onBeamDelete() +{ + LLComboBox* comboBox = getChild("PhoenixBeamShape_combo"); + + if(comboBox != NULL) + { + std::string filename = comboBox->getValue().asString()+".xml"; + std::string path_name1(gDirUtilp->getExpandedFilename( LL_PATH_APP_SETTINGS , "beams", filename)); + std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "beams", filename)); + + if(gDirUtilp->fileExists(path_name1)) + { + LLFile::remove(path_name1); + gSavedSettings.setString("PhoenixBeamShape","===OFF==="); + } + if(gDirUtilp->fileExists(path_name2)) + { + LLFile::remove(path_name2); + gSavedSettings.setString("PhoenixBeamShape","===OFF==="); + } + } + refreshBeamLists(); +} diff --git a/indra/newview/panel_prefs_firestorm.h b/indra/newview/panel_prefs_firestorm.h index 8ab8032e82..11695c600b 100644 --- a/indra/newview/panel_prefs_firestorm.h +++ b/indra/newview/panel_prefs_firestorm.h @@ -13,6 +13,12 @@ public: /*virtual*/ void apply(); /*virtual*/ void cancel(); + void refreshBeamLists(); + void onBeamColor_new(); + void onBeam_new(); + void onBeamColorDelete(); + void onBeamDelete(); + protected: LLLineEditor* m_calcLineEditor; LLLineEditor* m_acLineEditor; diff --git a/indra/newview/skins/default/textures/beam_phoenix.png b/indra/newview/skins/default/textures/beam_phoenix.png new file mode 100644 index 0000000000..ca2c519099 Binary files /dev/null and b/indra/newview/skins/default/textures/beam_phoenix.png differ diff --git a/indra/newview/skins/default/textures/beam_rainbow.png b/indra/newview/skins/default/textures/beam_rainbow.png new file mode 100644 index 0000000000..7444cec989 Binary files /dev/null and b/indra/newview/skins/default/textures/beam_rainbow.png differ diff --git a/indra/newview/skins/default/xui/en/floater_beamcolor.xml b/indra/newview/skins/default/xui/en/floater_beamcolor.xml new file mode 100644 index 0000000000..8077c3d5e7 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_beamcolor.xml @@ -0,0 +1,24 @@ + + + + + +Please use the mouse to select the colors for which +you wish your beam color to start and stop on. +Left Click Changes Start Position. +Right Click Changes End Position. + +Preview + +