Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lua): add end coordinates to lcd.drawTextLines #5452

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

LupusTheCanine
Copy link
Contributor

@LupusTheCanine LupusTheCanine commented Aug 17, 2024

adds text end coordinates to drawTextLines to enable stacking of draw textLines.

Fixes not knowing where prior multi-line drawTextLines calls have ended.

Summary of changes:
Adds new returns to lua.drawTextLines containing end bottom right corner of used text area.

I consider adding similar return to drawTimer, drawString, drawNumber

adds text end coordinates to drawTextLines to enable stacking of draw textLines.
@pfeerick pfeerick added lua-api Lua API related color Related generally to color LCD radios labels Aug 18, 2024
@pfeerick pfeerick changed the title feat: Add end coordinates to lcd.drawTextLines feat(lua): add end coordinates to lcd.drawTextLines Aug 18, 2024
@pfeerick pfeerick added this to the 2.11 milestone Aug 18, 2024
@pfeerick
Copy link
Member

Nice! The following crammed thrown into a test widget worked just fine.

local y
_, y = lcd.drawTextLines(1, 0, 100, 40, "No TxGPS detected!", LEFT + TEXT_COLOR)
lcd.drawTextLines(1, y, 100, 100, "Make sure your firmware has GPS support enabled", LEFT + TEXT_COLOR)

@pfeerick pfeerick merged commit e61fc89 into EdgeTX:main Aug 20, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios lua-api Lua API related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants