[Suggestion] SetTextAnchor, and a few more...

Started by GoodMorning, December 31, 2016, 08:23:34 AM

Previous topic - Next topic

GoodMorning

In CRPL, there was a command SetTextAnchor, which is missing from PRPL. Could we have it back, please?
For we who script, could there be a little bit of text, above the FPS readout, showing the UID of the closest unit/ship/particle to the cursor (same visibility command as the FPS readout, edit mode only)?

At the moment, a UI Core needs to go in the middle of the screen to show all of the text, which is untidy and obscures what I am trying to look at.

Also found: Screen mode Cores do not visually delete until the next frame. GetKey has trouble if two keys are held at the same time. Wiki generator skipped some of GetMousePosition.

HNY to all who read this. (Assuming that that TLA doesn't stand for something that I do not know of on the Internet.)
A narrative is a lightly-marked path to another reality.

knucracker

Anchoring the text will work a but differently in PRPL.
I've just added SetTextAlignment (string), SetTextPivotX(float), SetTextPivotY(float) to prpl (so check the next build).  Text alignment expects the strings like CRPL's TextAnchor did:

UpperLeft, UpperCenter, UpperRight
MiddleLeft, MiddleCenter, MiddleRight
LowerLeft, LowerCenter, LowerRight


The new text pivot is how you change the 'anchor' or pivot of the text.  It is a floating point number where 0.5 is the middle.  So setting the pivot to 0,0 would mean the lower left corner of the text becomes the anchor or pivot point. 0.5,0.5 is the default (the middle of the text).

GoodMorning

A narrative is a lightly-marked path to another reality.