Closed vxvvxv closed 4 years ago
ask at fgui repo
im sorry but, why would i ask in the fgui repo when im using surface not a proprietary graphics library? i've written my own little "framework" using pure surface functions with your base and now im wondering how to properly clip the viewport. as you can see in the original post i've gotten to the clipping part successfully but the clipped rectangle does not move with the menu, it just says in the corner of the screen, so, i'm asking anyone with the experience here for some help with it.
hey, im trying to clip the viewport for groupbox sliders etc. everything works correctly until i try to move the menu. the clipped section always stays in the same spot regardless where i move my menu.
inside painttraverse:
interfaces::surface->enable_clip(true); g_gui.draw_menu(); interfaces::surface->enable_clip(false);
inside my gui.cpp:
//render a groupbox, handle scrolling etc interfaces::surface->set_clip_rect(x + dist, y, width, height + scrolly);
i've tried just rendering a clipped rectangle inside the menu and the same issue arises, renders itself in the top left corner with no regard to the menus position.has anyone had any success in making a scrolling portion of the menu? (with engine rendering)