Premium Only Content
No Game Engine Game Dev: Word Sleuth 029: Finish text clipping/wrapping, updating text edit cursor
Streamed on 2024-08-12 (https://www.twitch.tv/thediscouragerofhesitancy)
Game Engines are for sissies!
Today we ported the text clipping from Text to MultiLineText. This was a fairly straightforward copy/paste operation. Then we simplified: I replaced Text with MultiColorText everywhere, removed Text, then renamed MultiColorText to Text. Now we only have one thing that renders text.
With clipping done, I did text wrapping. There are some caveats around very long words, however, that still need to be addressed. The trick is to maintain a "last good wrapping point" as you march through the string, then if you walk off the edge, move everything after the last-good-wrapping-point to your current character to the next line and shift it to the start of the line and do your usual new-line processing.
After all those updates, the TextEdit cursor was unusable so I started updating it. I found that there are a lot more caveats to finding a cursor position with all the new multi-line and word wrapping support. We'll wrap that up tomorrow.
-
LIVE
ThisIsDeLaCruz
42 minutes agoRunning Sound for Linkin Park
266 watching -
1:00:41
Glenn Greenwald
5 hours agoEXCLUSIVE: Succession Actress & Podcast Host Dasha Nekrasova Speaks Out About Hollywood Cancellation Over Fuentes Interview | SYSTEM UPDATE #549
86.8K45 -
31:27
Robbi On The Record
6 hours agoAstrology VS God: The Conversation Culture Has Been Avoiding | ft. JT Follows JC
1172 -
LIVE
SpartakusLIVE
2 hours agoTexas FARMBOY turned WZ PRO turned REDSEC HERO turned ARC LOOT GOBLIN
303 watching -
58:40
Donald Trump Jr.
4 hours agoCan California be Golden Again? Interview with Gubernatorial Candidate Steve Hilton | TRIGGERED Ep.293
84.3K59 -
LIVE
AirCondaTv Gaming
6 hours ago $0.71 earnedBattlefield 6: Burn Baby Burn. Like a Raging Inferno
89 watching -
1:06:20
BonginoReport
4 hours agoTrump, Vance “SNUBBED” by Never-Trumper Cheneys - Nightly Scroll w/ Hayley Caronia (Ep.182)
56.2K28 -
3:35:57
SlantRock
4 hours ago $0.46 earnedBATTLEFIELD REDSEC/ MAYBE ARC RAIDERS AFTER
8.77K -
LIVE
Astral Doge Plays!
2 hours agoHyrule Warriors: Age of Imprisonment ~LIVE!~ Ganondorf Is a Jerk
52 watching -
1:25:13
Kim Iversen
4 hours agoMKUltra Victims Are SUING — The CIA's Darkest Secret EXPOSED
98.9K58