Mickoi Posted January 9, 2021 Share Posted January 9, 2021 I have a question for you. Is it worth when all textures and fonts are in one resource and in that resource are 2 export functions? e.g. i did something like this: local TXT = {} function txt(script, txt) if TXT[script] and TXT[script][txt] then return TXT[script][txt].el else TXT[script] = {[txt] = {el = dxCreateTexture('txt/'..script..'/'..txt..'.png', 'argb', true, 'clamp')}} return TXT[script][txt].el end end For fonts is similiar function and question is, is it worth? Better would be when i create textures in resource where is render? Maybe you have other ideas Thank you in advance Link to comment
Moderators Patrick Posted January 10, 2021 Moderators Share Posted January 10, 2021 Yeah ofc, worth it. If you use the exact same texture/font in more resources. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now