Can glider do math?

Hello,

I know this is a weird question.

But I often have to do a replace for some sizes from iPhone to iPad.

The iPad images are twice as big, so I can just add *2 at the end.

But it would look better if instead of the *2 added I could replace the number with the correct new number.

THanks.

Hello Juf,

Sorry, it is currently not possible to do that with the regex alone. Though you do bring up an interesting feature request for a fully scriptable editor macros/plugins. We will think about a way to make the editor module more customizable. 

Regards,

M.Y. Developers

Thanks, I know it is just visually more pleasing at the moment.

But for more complex code it can really make it more readable.

Hello Juf,

How are you managing the 2 versions of your app? Do you have separate projects and are you just copying and pasting between them?

Regards,

M.Y. Developers

No,

storyboard. If the iPad is detected it switches to the iPad version So I have two lua files for each scene. Universal apps.

In the beginning I experimented with doing the switch in one file, but the code became to long and hard to read. It was just easier to copy the code to a new iPad only file.

A lot of the coordinates and motions I had in my code did not translate easily to the iPad. I use a lot of images that need to be on a specific place and can;t be done with a simple relative placement. 

So I got used to doing it in a code-iPone.lua and code-iPad.lua.

For this specific app I can convert the iPhone version by just adding +35 to the x and 130 to the y coordinates.

And multiplying the images by two. So I could have done that in one file. But I found out after I had already made the iPhone file.

Hello Juf,

Sorry, it is currently not possible to do that with the regex alone. Though you do bring up an interesting feature request for a fully scriptable editor macros/plugins. We will think about a way to make the editor module more customizable. 

Regards,

M.Y. Developers

Thanks, I know it is just visually more pleasing at the moment.

But for more complex code it can really make it more readable.

Hello Juf,

How are you managing the 2 versions of your app? Do you have separate projects and are you just copying and pasting between them?

Regards,

M.Y. Developers

No,

storyboard. If the iPad is detected it switches to the iPad version So I have two lua files for each scene. Universal apps.

In the beginning I experimented with doing the switch in one file, but the code became to long and hard to read. It was just easier to copy the code to a new iPad only file.

A lot of the coordinates and motions I had in my code did not translate easily to the iPad. I use a lot of images that need to be on a specific place and can;t be done with a simple relative placement. 

So I got used to doing it in a code-iPone.lua and code-iPad.lua.

For this specific app I can convert the iPhone version by just adding +35 to the x and 130 to the y coordinates.

And multiplying the images by two. So I could have done that in one file. But I found out after I had already made the iPhone file.