Hello! I'm making a user interface for my game(I want to do it by myself so I get more programming expirience). It's going ok but I have a problem that I can not resolve for long time. So as you can see in the video
, I made some kind of scrollable window(this particular window will show up information about choosed item), and those black squares(its buttons for testing
) are smoothly disappearing on the edge of the window. For this effect ViewPort was used. Im drawing these buttons to the separate view, than setting viewport so that it matches position of window and its size. And then when wheel is scrolled, or bar is mooved this viewPorted view is mooving up and down like so
windowView.move(0, +- step);
My problem is that I want to put, let's say, such window inside other window. So that Im kind of want to draw viewPort to other view. But as I understand viewPorts are drawn on the only default view of a target window, so its not really possible to put one "inside" another. Can someone help me if Im missing something? Maybe its dumb idea to use ViewPort for such task, and maybe it is other ways to "crop" content like this? Or maybe I actually can draw one ViewPort to other views? I will be happy to hear any advice. Also sorry for my horrible english.