BigW Consortium Gitlab

Commit cb0677e3 by Gabor Kiss-Vamosi

lua: start to add Lua interface

parent 3eeb7047
diff --git a/lv_core/lv_obj.c b/lv_core/lv_obj.c
index bb4cecb..8ae35ca 100644
--- a/lv_core/lv_obj.c
+++ b/lv_core/lv_obj.c
@@ -1202,7 +1202,18 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj)
while(par) {
if(par->style_p) {
if(par->style_p->glass == 0) {
+#if USE_LV_GROUP == 0
style_act = par->style_p;
+#else
+ /*Is a parent is focused then use then focused style*/
+ lv_group_t *g = lv_obj_get_group(par);
+ if(lv_group_get_focused(g) == par) {
+ style_act = lv_group_mod_style(g, par->style_p);
+ } else {
+ style_act = par->style_p;
+ }
+#endif
+
break;
}
}
/**
* @file lv_lua.h
*
*/
#ifndef LV_LUA_H
#define LV_LUA_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../../lv_conf.h"
#if LV_BUILD_LUA
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_lua_set_context(lua_State *L);
lua_State * lv_lua_get_context(void);
void lv_lua_register(void);
void lv_lua_register_function(void * c_func, const char * lua_name);
void lv_lua_register_const(int num, const char * lua_name);
void lv_lua_register_pointer(void * p, const char * lua_name);
/**********************
* MACROS
**********************/
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_LUA_H*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment