Skip to content

Have text:pos(x, y) position right-justified texts properly #2213

@Dev-Roland

Description

@Dev-Roland

Issue:

Right-aligned objects disappear when the self:pos(x, y) function is used on them.

Steps to Reproduce:

local texts = require('texts')
local text = texts.new('Hello world')
text:pos(100,100)
text:right_justified(true)
text:show() -- now you see me
coroutine.schedule(function()
    text:pos(110, 110) -- now you don't
end, 3)

Expected Behavior

The text would not disappear and the text's top-right corner would be at the x/y position passed into the pos function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions