Jump to content

Texture and font system, is it worth?


Mickoi

Recommended Posts

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(scripttxt)
    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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...