Skip to content

Commit 9da0fd1

Browse files
committed
Update Framehandle.wurst
1 parent c55b73d commit 9da0fd1

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

wurst/_handles/Framehandle.wurst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,11 @@ public function framehandle.getAlpha() returns int
453453
return BlzFrameGetAlpha(this)
454454

455455
/** Sets the alpha value of the frame in the range 0 to 255, for frame types that support alpha.
456+
Verified to work on backdrops, images and glue buttons (on a glue button the fade covers the whole
457+
button, child backdrops included). Apply it AFTER the frame has been parented, anchored and sized:
458+
alpha set on a freshly created frame before a layout positions it is wiped, so set it once the
459+
frame is in its final place. Reads as "disabled" to players, so prefer it for genuinely inactive
460+
elements rather than as a "selected / active" highlight.
456461
Do not call on String or Texture SimpleFrame children. */
457462
public function framehandle.setAlpha(integer alpha)
458463
BlzFrameSetAlpha(this, alpha)
@@ -530,17 +535,22 @@ public function framehandle.setHeight(real height)
530535
public function framehandle.setSize(real width, real height)
531536
BlzFrameSetSize(this, width, height)
532537

533-
/** Sets the vertex color of the model frame.
534-
The color channels are expected in the range 0 to 255. */
538+
/** Tints a MODEL or sprite frame by its vertex colour; channels in the range 0 to 255.
539+
This does NOT recolour ordinary UI textures: verified in-game to have no visible effect on a
540+
BACKDROP, an image (which is a backdrop), or a glue button. To recolour such elements, swap the
541+
texture (setTexture) or use a differently coloured FDF backdrop; for text use the font colour or
542+
|cAARRGGBB ... |r colour codes. */
535543
public function framehandle.setVertexColor(color pcolor)
536544
BlzFrameSetVertexColor(this, BlzConvertColor(255, pcolor.red, pcolor.green, pcolor.blue))
537545

538-
/** Sets the vertex color of the model frame.
539-
The color channels are expected in the range 0 to 255. */
546+
/** Sets the vertex colour (with alpha) of a MODEL or sprite frame; channels in the range 0 to 255.
547+
Model/sprite only: it does not recolour BACKDROP / image / glue-button UI textures (see the
548+
color overload above). */
540549
public function framehandle.setVertexColor(colorA color)
541550
BlzFrameSetVertexColor(this, BlzConvertColor(color.alpha, color.red, color.green, color.blue))
542551

543-
/** Sets the vertex color of the model frame as a packed Warcraft III color integer. */
552+
/** Sets the vertex colour of a MODEL or sprite frame as a packed Warcraft III colour integer.
553+
Model/sprite only: it does not recolour BACKDROP / image / glue-button UI textures. */
544554
public function framehandle.setVertexColor(integer color)
545555
BlzFrameSetVertexColor(this, color)
546556

0 commit comments

Comments
 (0)