+function menu.set_texture(identifier,gamedetails)
+ local texture_set = false
+ if menu.texturepack ~= nil then
+ local path = menu.basetexturedir ..
+ gamedetails.id .. "_menu_" .. identifier .. ".png"
+
+ if engine.set_background(identifier,path) then
+ texture_set = true
+ end
+ end
+
+ if not texture_set then
+ local path = gamedetails.path .. DIR_DELIM .."menu" ..
+ DIR_DELIM .. identifier .. ".png"
+ if engine.set_background(identifier,path) then
+ texture_set = true
+ end
+ end
+
+ if not texture_set then
+ local path = menu.basetexturedir .. DIR_DELIM .."menu_" ..
+ identifier .. ".png"
+ if engine.set_background(identifier,path) then
+ texture_set = true
+ end
+ end
+
+ if not texture_set then
+ local path = menu.defaulttexturedir .. DIR_DELIM .."menu_" ..
+ identifier .. ".png"
+ engine.set_background(identifier,path)
+ end
+end
+