I'm working on a popup message window for my uncle's game Dark Expanse. The idea is that clicking a star on the star map will pop up a small "e-mail" window displaying messages related to that star. The code is a work in progress, but I just hit a milestone and wanted to upload it quick.
At this point, the data is loaded using a $.getJSON call, displayed in the message selector, and clicking a message loads it into the display area. The last few hours have been spent integrating a scrollbar solution so that the scrollbars are always a fixed width, instead of dealing with browser and UI inconsistencies. I used Tiny Scrollbar created by Maarten Baijs because it was simple, straightforward, and very lightweight. I've also handled up and down arrow keystrokes, and set it so that the scrollbar updates when the newly selected message is outside of the viewport. I'm not sure if anyone else will find this code useful, and I'm not even sure what to call it, but perhaps someone else needs something similar.
Add new comment