Fixing crash in particle effect beams due to missing overloaded operator.

Minor improvements to beam floaters and XUI cleanup.
meow-7.2.2
Ansariel 2011-06-30 09:59:20 +02:00
parent c839f2526a
commit 563f4fc2b8
4 changed files with 185 additions and 44 deletions

View File

@ -299,7 +299,7 @@ void lggBeamMapFloater::onClickLoad()
lggPoint p;
LLVector3 vec = LLVector3(beamData["offset"]);
vec *= (scale)/(8.0f/(rec.getWidth()));
LLColor4 color = beamData["color"];
LLColor4 color = LLColor4(beamData["color"]);
p.c = color;
p.x = (S32)(vec.mV[VY]+rec.getCenterX());
p.y = (S32)(vec.mV[VZ]+rec.getCenterY());

View File

@ -230,10 +230,7 @@ F32 lggBeamMaps::setUpAndGetDuration()
dot.p = LLVector3d(beamData["offset"]);
dot.p *= (gSavedSettings.getF32("PhoenixBeamShapeScale")*2.0f);
LLColor4 color = beamData["color"];
dot.c = LLColor4U(color);
dot.c = LLColor4U(beamData["color"]);
dots.push_back(dot);
}

View File

@ -1,24 +1,119 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater border="false" can_close="true" can_minimize="true" bottom="400" left="300" can_resize="false" height="250" name="BeamColor" title="Beam Color Rotate" width="410">
<panel name="BeamColor_Picker" left="5" width="400" height="80" bottom_delta="90" border="true" mouse_opaque="true" bevel_style="in" background_visible="false" background_opaque="true" follows="left|top" bg_opaque_color="1,1,1,0" bg_alpha_color="white" can_resize="false">
</panel>
<text font="SansSerifSmall" name="beamcolor_text" follows="left|top" left="15" bottom_delta="50" height="40">
<floater
border="false"
can_close="true"
can_minimize="true"
bottom="400"
left="300"
can_resize="false"
height="250"
name="BeamColor"
title="Beam Color Rotate"
width="410"
save_rect="true">
<panel
name="BeamColor_Picker"
left="5"
width="400"
height="80"
bottom_delta="90"
border="true"
mouse_opaque="true"
bevel_style="in"
background_visible="false"
background_opaque="true"
follows="left|top"
bg_opaque_color="1,1,1,0"
bg_alpha_color="white"
can_resize="false">
</panel>
<text
font="SansSerifSmall"
name="beamcolor_text"
follows="left|top"
left="15"
bottom_delta="50"
height="40">
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.</text>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom="-50" can_apply_immediately="true" color="1, 1, 1, 1" follows="left|top" height="100" label="" left="300" mouse_opaque="true" name="BeamColor_Preview" tool_tip="Click to open Color Picker" width="100" />
<text font="SansSerifSmall" name="beamcolor_text2" follows="left|top" left_delta="30" bottom_delta="0">Preview</text>
<slider bottom="-50" left="15" name="BeamColor_Speed" control_name="BeamColor_Speed" decimal_digits="0" enabled="true" follows="left|top" height="18"
increment="1" initial_val="100" label="Rotation Speed:" label_width="85" max_val="300" min_val="0" mouse_opaque="true"
show_text="true" width="280" auto_resize="false" tool_tip="Controls the speed of the color cycle"/>
<button bottom_delta="30" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Save" left="70"
mouse_opaque="true" name="BeamColor_Save" scale_image="true" width="85" />
<button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Load" left_delta="90"
mouse_opaque="true" name="BeamColor_Load" scale_image="true" width="85" />
<button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Cancel" left_delta="100"
mouse_opaque="true" name="BeamColor_Cancel" scale_image="true" width="85" />
Right Click Changes End Position.
</text>
<color_swatch
border_color="0.45098, 0.517647, 0.607843, 1"
bottom="-50"
can_apply_immediately="true"
color="1, 1, 1, 1"
follows="left|top"
height="100"
label=""
left="300"
mouse_opaque="true"
name="BeamColor_Preview"
tool_tip="Click to open Color Picker"
width="100" />
<text
font="SansSerifSmall"
name="beamcolor_text2"
follows="left|top"
left_delta="30"
bottom_delta="0">
Preview
</text>
<slider
bottom="-50"
left="15"
name="BeamColor_Speed"
control_name="BeamColor_Speed"
decimal_digits="0"
enabled="true"
follows="left|top"
height="18"
increment="1"
initial_val="100"
label="Rotation Speed:"
label_width="85"
max_val="300"
min_val="0"
mouse_opaque="true"
show_text="true"
width="280"
auto_resize="false"
tool_tip="Controls the speed of the color cycle"/>
<button
bottom_delta="30"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Save"
left="70"
mouse_opaque="true"
name="BeamColor_Save"
scale_image="true"
width="85" />
<button
bottom_delta="0"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Load"
left_delta="90"
mouse_opaque="true"
name="BeamColor_Load"
scale_image="true"
width="85" />
<button
bottom_delta="0"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Cancel"
left_delta="100"
mouse_opaque="true"
name="BeamColor_Cancel"
scale_image="true"
width="85" />
</floater>

View File

@ -1,16 +1,42 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater border="false" can_close="true" can_minimize="true" bottom="400" left="300"
can_resize="false" height="407" name="BeamCreator" title="Beam Shape Creator" width="410">
<text font="SansSerifSmall" name="beamcreator_text" follows="left|top" left="10" bottom="-350" height="50" width="300">
<floater
border="false"
can_close="true"
can_minimize="true"
bottom="400"
left="300"
can_resize="false"
height="407"
name="BeamCreator"
title="Beam Shape Creator"
width="410"
save_rect="true">
<text
font="SansSerifSmall"
name="beamcreator_text"
follows="left|top"
left="10"
bottom="-350"
height="50"
width="300">
To create a new beam, left click the panel below to
define a beam ray of the selected color, or right click to
remove a ray. Press the Save button when done.
</text>
<color_swatch border_color="0.45098, 0.517647, 0.607843, 1" bottom_delta="10"
can_apply_immediately="true" color="1, 1, 1, 1" follows="left|top"
height="60" label="Beam Color" left_delta="325" mouse_opaque="true"
name="beam_color_swatch" tool_tip="Click to open Color Picker to change dot color" width="65" />
<color_swatch
border_color="0.45098, 0.517647, 0.607843, 1"
bottom_delta="10"
can_apply_immediately="true"
color="1, 1, 1, 1"
follows="left|top"
height="60"
label="Beam Color"
left_delta="325"
mouse_opaque="true"
name="beam_color_swatch"
tool_tip="Click to open Color Picker to change dot color"
width="65" />
<panel
name="beamshape_draw"
@ -29,17 +55,40 @@ remove a ray. Press the Save button when done.
can_resize="false">
</panel>
<button bottom_delta="30" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Save" left_delta="10"
mouse_opaque="true" name="beamshape_save" scale_image="true" width="85" />
<button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Load" left_delta="90"
mouse_opaque="true" name="beamshape_load" scale_image="true" width="85" />
<button bottom_delta="0" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="22" label="Clear" left_delta="100"
mouse_opaque="true" name="beamshape_clear" scale_image="true" width="85" />
<!--
-->
<button
bottom_delta="30"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Save"
left_delta="10"
mouse_opaque="true"
name="beamshape_save"
scale_image="true"
width="85" />
<button
bottom_delta="0"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Load"
left_delta="90"
mouse_opaque="true"
name="beamshape_load"
scale_image="true"
width="85" />
<button
bottom_delta="0"
enabled="true"
follows="left|top"
halign="center"
height="22"
label="Clear"
left_delta="100"
mouse_opaque="true"
name="beamshape_clear"
scale_image="true"
width="85" />
</floater>