March 14, 2013 at 11:06 am #10029
First of all, I don't know if it's possible to make…In one app that I made I have one superior menu that it is the same in 45 pages. Also I have one draggable menu that is the same in the same 45 pages.In other pages I have other superior menu for 10 pages....All of this in 4 languajes.I think it will be interesting to know if it's possible to add this with external code, library or somethingI think it is a problem that the same code, layers and images have to be in all the pages. I don't know if it is possible to make the code for the superior menu in one page and after save it to use it in diffefent pages like external code, library...¿?If we have to copy and modify some code I think we can learn it.It would be a good help to have a tutorial to can use the same elements in different pages and don't have to have a lot o pages with the same images, layers, code, variables...Perhaps this can reduze the render time alsoIn this case I don't know if it would be good for that projects who need a lot of variables (in corona you can not use more than 200 variables)I say this because in one page with a lot of layers, differents languajes, a lot of buttons.... is possible to get more than 200 variables.AnonymousMarch 14, 2013 at 4:32 pm #14456
In order to do what you are asking you will need to codify your menu and add it in the main.lua file (2.3 beta already allow you to do that). Unfortunately doing what you suggest will require lots of external code and I don't think this is going to be something that beginners will be able to follow (experts already know how to do that). Let me think…Regarding 200 variables, there's not much to do at this moment. I will need to (pretty much) re-write Kwik to solve this issue (a maj. However, in order to avoid zillions of issues with current projects, I will not change Kwik until the next major release (version 3).March 14, 2013 at 6:10 pm #14457
Ok I understand. It was only to give ideas to make tutorials if they are not very complex for the major part of users. I think the best way to improve kwik is to make the projects with an interactive interface like now. Also it's interesting to have the possibility to add somethings with code. One question only. If I codify the menu and add it in the main.lua file it will appear in all the pages or ca I call it only in some pages?thanksAnonymousMarch 14, 2013 at 6:21 pm #14458
It will depend of your code. You will need to create “IF” statement to show (or not) the menu in some pages.vr.e.ni.zim.mer.ma.nn1983ParticipantMarch 14, 2013 at 6:46 pm #14459
You definitely shouldn't create the entire menu in the main page. Rather require an external page from main. Then call a new instance of the menu in whatever other page you need it.So create your menu in a new page of your project, add a require statement in the main and then call new in every page you want it. I don't have the exact syntax as I'm away from my project but you can research how to do this easily by googling require in corona.April 25, 2013 at 6:42 pm #14461
Fantastic, I've get it. Thanks to Alex and KilopopNow I have some pages with the top menu, some with lateral menu, and some with top menu and lateral menu. It's not very difficult. I've seen the post http://kwikplugin.com/forums/index.php/topic,952.0.htmlNow I go to try if in the external menu is possible to have multilingual also.I've one question. If I make a request to external library withmenu = require("page_23") and after call the menu in one page withmenu.new() When I publish one page with two calls of external code is the total of variables = the variables from the pages + the variables from the external code?I say this for the problem with 200 variablesAnonymousApril 25, 2013 at 7:18 pm #14462
No, it will not count for the 200 variables limit. In fact this limit are for variables inside a function only.
You must be logged in to reply to this topic.