mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
Refactor modules, closes #223
* All modules are sandboxed now * All images,sounds,fonts,translations and styles were moved to "data" folder * Reorganize image files folders * Remove unmaintained modules: client_particles, client_shaders * Implement new automatic way to load styles and fonts * Add hide/show offline option in VipList * Add invite/exclude to/from private channel in players menus * Many other minor changes
This commit is contained in:
21
modules/client_styles/styles.lua
Normal file
21
modules/client_styles/styles.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
function init()
|
||||
local styles = g_resources.listDirectoryFiles('/styles')
|
||||
for _i,style in pairs(styles) do
|
||||
if string.ends(style, '.otui') then
|
||||
g_ui.importStyle('/styles/' .. style)
|
||||
end
|
||||
end
|
||||
|
||||
local fonts = g_resources.listDirectoryFiles('/fonts')
|
||||
for _i,font in pairs(fonts) do
|
||||
if string.ends(font, '.otfont') then
|
||||
g_fonts.importFont('/fonts/' .. font)
|
||||
end
|
||||
end
|
||||
|
||||
-- TODO load particles
|
||||
end
|
||||
|
||||
function terminate()
|
||||
end
|
||||
|
||||
9
modules/client_styles/styles.otmod
Normal file
9
modules/client_styles/styles.otmod
Normal file
@@ -0,0 +1,9 @@
|
||||
Module
|
||||
name: client_styles
|
||||
description: Load client fonts and styles
|
||||
author: edubart
|
||||
website: www.otclient.info
|
||||
scripts: [ styles ]
|
||||
sandboxed: true
|
||||
@onLoad: init()
|
||||
@onUnload: terminate()
|
||||
Reference in New Issue
Block a user