Added gui_util

This commit is contained in:
MihailRis
2023-12-07 13:18:28 +03:00
parent e3f7f7218f
commit 2055cff0be
11 changed files with 122 additions and 35 deletions
+5 -2
View File
@@ -81,11 +81,14 @@ void MenuScreen::draw(float delta) {
uishader->use();
uishader->uniformMatrix("u_projview", uicamera->getProjView());
uint width = Window::width;
uint height = Window::height;
batch->begin();
batch->texture(engine->getAssets()->getTexture("menubg"));
batch->rect(0, 0,
Window::width, Window::height, 0, 0, 0,
UVRegion(0, 0, Window::width/64, Window::height/64),
width, height, 0, 0, 0,
UVRegion(0, 0, width/64, height/64),
false, false, vec4(1.0f));
batch->render();
}