In Cent there is going to be several places where you can type in text. Naturally, I want to have a decent GUI and give the user a textbox within which they may place their text. In VB, or anything else that's got a form designer for that matter, this is a snap. Just drag and drop a textbox onto your form and you've got yourself a nice textbox.
However, I'm not using a form designer. Instead, I'm coding every aspect of the display, which means I can't just drag and drop things. For images, buttons, and text this isn't too bad. However, the fun began when I wanted a textbox a user can edit.
Now, Crystal Space has some sort of Windowing System. I didn't look too much into it, but from what I gather it's quite complicated. So I figured I'd do my own controls. How hard can it be anyway?
Textboxes hurt. Think of all the things you take for granted. When you click inside a textbox, what actually happens? You've gotta figure out where in the textbox the user clicked. But that's not enough! You have to calculate what character is at the point the user clicked, find out if it's closer that character's left side or right side, and move the cursor there. To do this, you must know how wide each character is and exactly where on the screen it is positioned.
And what if the text is too wide for the field? AARGH!!! As you can see, this gets really ugly really quick. Thank goodness for reusable code.
In any case, so far I've got my text box properly clickable so that the cursor appears in the right place. I just have to add in the eye candy (I-beam mouse when you're over the textbox, and a flashing cursor), and the ability to actually... you know... type characters into the box.
This is my blog where I give my thoughts and opinions on various topics and share my creative endeavors with the world. I run two personal blogs, but combine them here for ease of access.
Blogger - My oldest blog using the Blogger platform contains posts full of opinions, gaming, and code.
Tumblr - Tumblr posts are all about my creative side, containing music, videos, writings, and updates on my web creations.
You can select a category below to view the latest post, or browse thorugh the posts using the navigation found at the top and bottom of each post.
Yeah, it's season 11. But the OTL Season 6 highlight reel is up, this time Fireball has taken the reins! Check out this video jam packed full of kills, deaths, silliness, and Sirius puns. https://www.youtube.com/watch?v=SXstLVjnaGo
Bing is so bad. https://otl.gg is being blocked in their search results, and Bing webmaster tools are absolutely useless, not telling me why it's being blocked.
Does anyone know of some way to get a human to look at this and see what's wrong with it? #bing#microsoft
Me and my wife, despite buying a house of nice size, always seem to get in each other's way, be it in the kitchen, on the stairs, it doesn't matter. She's all up in my two square feet.
I often joke that all I want for Christmas is my two square feet.
I got the honor and privilege of calling the NES Tetris NTSC world record today while running Classic Tetris Wars on my Twitch channel for the very first time. It was thrilling. Congratulations to Blue Scuti for his 6,609,220 level 153 performance. https://clips.twitch.tv/DiligentDeadGoldfishDoritosChip-cx_vDMWAjKaZUK6N
Six Degrees of Sunday, my 6DoF long play Twitch series, is getting revived for 2024. Plus, I will be producing Six'd Off, a companion YouTube series showcasing each game.
@shanselman Speaking of Overload, here's something you may be interested in... recently, some community members released "Overload First Strike", a single player Overload campaign that is a complete remake of the original Descent First Strike campaign.
It can work with just the original game, but it works best with "olmod" as it takes advantage of some of the features it provides: https://olmod.overloadmaps.com