britzl / gooey

Defold GUI system
MIT License
150 stars 22 forks source link

How can I change the theme ? #65

Closed Brun0oO closed 3 years ago

Brun0oO commented 3 years ago

Hi,

I have a working project using gooey GUI with a single button.

I would like to use the gooey-dirtylarry theme for example. I added the following dependencies in my game.project file :

https://github.com/britzl/gooey/archive/master.zip 
https://github.com/britzl/gooey-dirtylarry/archive/main.zip

So, if I replaced the line :

local gooey = require "gooey.gooey"

by this line :

local gooey = require "gooey.themes.dirtylarry.dirtylarry"

(because my assumption is : this is the same interface for acquire_input and button functions between the genuine gooey interface and the dirtylarry gooey theme interface...)

when I execute my code, I got this error :

/example/menu.gui_script
    The file '/gooey/themes/dirtylarry/dirtylarry.lua' could not be found.

What is my mistake ? Thanks for your help...

britzl commented 3 years ago

local gooey = require "gooey.themes.dirtylarry.dirtylarry"

This is the file you wish to require:

https://github.com/britzl/gooey-dirtylarry/blob/main/gooey-dirtylarry/dirtylarry.lua

local gooey = require "gooey-dirtylarry.dirtylarry"
Brun0oO commented 3 years ago

Ok thank you, it works !