There’s a text list box with limited functionality, but I was wondering if there’s a scrollable canvas that I can put button and graphics on? For my graphical save games list.
No, but you could implement one by having a scroll position in a variable and moving all controls by offset, as controls are not drawn outside of GUI border.
If you want to emulate this "canvas" inside a larger GUI, so that only portion of it scrolls, then make it a separate transparent GUI positioned right over the "parent" one and place scrolled controls there.
So a separate gGUI-2 for the scrollable canvas with ZOffset=10, and a gGUI-1 with offset=9 to display the scrollable canvas on? Just wondering how to get a GUI the correct size.
Quote from: bx83 on Wed 26/05/2021 01:16:09
So a separate gGUI-2 for the scrollable canvas with ZOffset=10, and a gGUI-1 with offset=9 to display the scrollable canvas on? Just wondering how to get a GUI the correct size.
It's ZOrder, not zoffset, to be precise, but yes something like that.
Not sure I understand the question of the size, what is your situation?
I have gSaveLoad, which contains my 'portraits' of nine savegames. My total game window is only 1366x768 so it's hard or impossible to fit more (not to mention I have to add all 9 game controls manually, but that's another story, I'll go through your suggested code once I have this down).
So I will have to, I imagine:
-change gSaveLoad to gSaveCanvas, make it's 840x2000, add the extra savegame 'portraits', and make it's ZOrder=10
-make a new GUI, and use it to replace the smaller window (previous gSaveLoad), make it's ZOrder=9
-somehow figure out how to place one GUI on to another (presumably make them both visible, and then use the gSaveCanvas.Y and a scroll thing on the left to 'scroll' it up and down with the mouse wheel)
-???
-done
Does this sound accurate? How will the smaller border of the (new) gSaveLoad 'cover' the larger borders of gSaveCanvas if they're just one on top of the other?
(https://bluekeystudios.com/img/gsaveload.png)