public static void LuaGetLineType(ILuaExecuter executer) { var parameters = executer.PopParameters(); var input = parameters[0] as IInputField; if (null != input) { executer.PushResult(input.LineType); } }
public static void LuaGetOption(ILuaExecuter executer) { var parameters = executer.PopParameters(); var dropdown = parameters[0] as IDropDown; if (null != dropdown && null != parameters[1]) { var index = Convert.ToInt32(parameters[1]); executer.PushResult(dropdown.GetOption(index)); } }
public static void LuaGetTextColor(ILuaExecuter executer) { var parameters = executer.PopParameters(); var label = parameters[0] as ILabel; if (null != label) { var color = label.Color; executer.PushResult(color.r); executer.PushResult(color.g); executer.PushResult(color.b); executer.PushResult(color.a); } else { executer.PushResult(0); executer.PushResult(0); executer.PushResult(0); executer.PushResult(0); } }