Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [AGK] Spreadsheet GUI

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Mar 2024 18:42
Made this because.... well just because. While this loads the table data from a json string, it's simple enough to build it however you want. Because drawing commands by default are drawn last over sprites and text, I opted to use a sprite for the background and window header. You can move the window by dragging the header, resize the window (drag lower right corner) and columns, and scroll using the mouse or dragging the scrollbar. Though as I write this I just remembered it only does vertical scrolling, I forgot to implement horizontal....
I designed it to make it somewhat easy to change themes of the window.




Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Mar 2024 22:56 Edited at: 8th Mar 2024 22:59
Made a new demo. This one is modified slightly as its going to be part of a larger app I'm doing, so no title bar. Positioning is manually set. But I've added alternate row colors, selection, and doubleclick events. Also a function to add data from an array instead of json and to retrieve data from the table. To do the row colors, I use an image and tile it across the sprite. In order to do this the image size has to be a multiple of 2 to use the UV commands. This limits the text size as well.




Required "rows.png" image



main.agc



table.agc
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-04-27 10:29:34
Your offset time is: 2024-04-27 10:29:34