This was my attempt in
https://github.com/charlesgriffiths/agk-modules/blob/main/juice/shaker/shaker.agc
// internal helper function to copy a text object (which for some reason cannot be cloned)
function Shaker_CloneText( text as integer )
id as integer
id = CreateText( GetTextString( text ))
SetTextColor( id, GetTextColorRed( text ), GetTextColorGreen( text ), GetTextColorBlue( text ), GetTextColorAlpha( text ))
SetTextDepth( id, GetTextDepth( text ))
SetTextLineSpacing( id, GetTextLineSpacing( text ))
SetTextPosition( id, GetTextX( text ), GetTextY( text ))
SetTextSize( id, GetTextSize( text ))
SetTextSpacing( id, GetTextSpacing( text ))
// bold?
if GetTextTotalWidth( text ) > GetTextTotalWidth( id ) then SetTextBold( id, 1 )
endfunction id
which I will update to
// internal helper function to copy a text object (which for some reason cannot be cloned)
function Shaker_CloneText( text as integer )
id as integer
id = CreateText( GetTextString( text ))
SetTextColor( id, GetTextColorRed( text ), GetTextColorGreen( text ), GetTextColorBlue( text ), GetTextColorAlpha( text ))
SetTextDepth( id, GetTextDepth( text ))
SetTextLineSpacing( id, GetTextLineSpacing( text ))
SetTextPosition( id, GetTextX( text ), GetTextY( text ))
SetTextSize( id, GetTextSize( text ))
SetTextSpacing( id, GetTextSpacing( text ))
SetTextAlignment( id, GetTextAlignment( text ))
SetTextAngle( id, GetTextCharAngle( text, 0 ))
// bold?
if GetTextTotalWidth( text ) > GetTextTotalWidth( id ) then SetTextBold( id, 1 )
endfunction id
Thanks for taking the time.