Compare commits

...

2 Commits

View File

@@ -1036,7 +1036,7 @@
(method :Void showTooltipText [:FlxSprite control :String text :Map<String,Action> altActions]
(let [numAltActions (count altActions)
mousePos (FlxG.mouse.getWorldPosition controlCamera tempPoint)
widthAllowed (- width mousePos.x)]
widthAllowed (- width (- mousePos.x controlCamera.scroll.x))]
// With alt actions, append the number of them to the tooltip
(when (< 0 numAltActions)
@@ -1056,7 +1056,7 @@
(when tooltipSprite
(tooltipSprite.kill)
(tooltipSprite.destroy))
(set tooltipSprite (SpriteTools.textPlateV2 text textSize (/ textSize 2) (objectWith [width (min widthAllowed (- width control.x))] textColor bgColor null fontPath)))
(set tooltipSprite (SpriteTools.textPlateV2 text textSize (/ textSize 2) (objectWith [width (min widthAllowed (- width (- control.x controlCamera.scroll.x)))] textColor bgColor null fontPath)))
(set tooltipSprite.x mousePos.x)
(set tooltipSprite.y mousePos.y)
(flixel.util.FlxSpriteUtil.drawRect tooltipSprite 0 0 tooltipSprite.width tooltipSprite.height FlxColor.TRANSPARENT (object color textColor))
@@ -1074,8 +1074,8 @@
(method :Void moveTo [:FlxPoint position]
(set x position.x)
(set y position.y)
(set controlCamera.x (+ camera.x position.x))
(set controlCamera.y (+ camera.y position.y)))
(set controlCamera.x (+ camera.x position.x (- camera.scroll.x)))
(set controlCamera.y (+ camera.y position.y (- camera.scroll.y))))
(method :Void resize [:Int width :Int height]
(makeGraphic