YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
13 stars 5 forks source link

Code Editor 2: Colouring and tooltip issues #5285

Closed Alphish closed 2 weeks ago

Alphish commented 1 month ago

Description

I noticed three issues:

image MandatoryPackage.zip

Expected Change

No response

Steps To Reproduce

  1. Create new script
  2. Paste the following code:

    /// @func approach(current,target,[step])
    /// @desc Calculates the value a step closer to the target value. If the target is close enough, returns the target.
    /// @url https://github.com/Alphish/gm-community-toolbox/blob/880d373b7e73040658dc57254350d9a14c18eb81/Community%20Toolbox/scripts/utils_CommunityToolboxMath/utils_CommunityToolboxMath.gml#L51
    /// @arg {Real} current         The current value.
    /// @arg {Real} target          The target value.
    /// @arg {Real} [step]          The step to approach the target by (1 by default).
    /// @returns {Real}
    function approach(_current, _target, _step = 1) {
    // for a negative step, the value moves away from the target indefinitely
    if (_step < 0)
    return _current + sign(_target - _current) * _step;
    
    // for a positive step, the object approaches the target until reaching it
    var _diff = _target - _current;
    return abs(_diff) < _step ? _target : _current + sign(_diff) * _step;
    }
  3. Observe the problems with @func annotation and [step] argument colouring
  4. Try to type an approach(...) call, so that the autocomplete function tooltip would appear. You may also hover over the function name to show hover tooltip for comparison
  5. Observe that the underscored argument names appear for the autocomplete tooltip, and the function signature from @func appears in the description of both tooltips.

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.400 (Betas)

Which operating system(s) are you seeing the problem on?

Windows 10

Are you running GameMaker from inside your Steam library?

No

Contact Us Package Attached?

Sample Project Added?

zreedy commented 2 weeks ago

Fixed. Excluding the highlighting of @func as this is deprecated behavior in CE2 and does nothing. It not being highlighted is intentional and communicates that CE2 does not recognize or utilize this jsdoc property.

caitlinrmcintyre commented 4 days ago

Verified fix in Beta IDE v2024.600.0.560 Runtime v2024.600.0.577, thanks.