Jump to content


Photo

Separate characters instead of regular numbers.


  • Please log in to reply
7 replies to this topic

#1 Loui (PD1LOI)

  • Senior Member
  • 4,529 posts

+140
Excellent

Posted 9 March 2021 - 11:41

Sometimes you come across plugins with their own skin, but you sometimes see strange characters in them, for example
position = "% d, 0" size = "1080,% d" what is the meaning of "% d" and how do you calculate it to get the correct measurements?
 
(Google Translate).


Re: Separate characters instead of regular numbers. #2 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 9 March 2021 - 11:51

I hate plugins that add custom screens where actually a standard screen can be used.... what % means I do not know... but it seems it insert ‘variable’ values here you actually never can adjust with your/our custom skins. So it just inserts solid numbers. The calculation is in the code

Edited by littlesat, 9 March 2021 - 11:52.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Separate characters instead of regular numbers. #3 Loui (PD1LOI)

  • Senior Member
  • 4,529 posts

+140
Excellent

Posted 9 March 2021 - 12:04

I hate plugins that add custom screens where actually a standard screen can be used.... what % means I do not know... but it seems it insert ‘variable’ values here you actually never can adjust with your/our custom skins. So it just inserts solid numbers. The calculation is in the code

Ben ik met je eens, maar ik was gewoon benieuwd wat dat nu precies inhoud en waarom men dit doet.



Re: Separate characters instead of regular numbers. #4 littlesat

  • PLi® Core member
  • 56,272 posts

+691
Excellent

Posted 9 March 2021 - 12:32

Er staat dan meestal achter de string weer er.% met waardes/formules tussen ()

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Separate characters instead of regular numbers. #5 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 24 March 2021 - 11:29

Which plugin?



Re: Separate characters instead of regular numbers. #6 MCelliotG

  • Senior Member
  • 443 posts

+35
Good

Posted 24 March 2021 - 23:19

I also see skins that have the e parameter? For instance position="e-144". What does it mean?

Does it have to do with a dynamic placement for icons, like when an icon is active it moves another one next to it and when it is not active, the other one moves back to its original position?



Re: Separate characters instead of regular numbers. #7 Huevos

  • PLi® Contributor
  • 4,247 posts

+158
Excellent

Posted 25 March 2021 - 00:11

"e" means end. So "e-14" means 14px less than the dimension of the parent element.

 

So say you want to create 60 px high horizontal background at the bottom of the screen  to hover your button texts over...

<eLabel position="0,e-60" size="e,60" backgroundColor="black" zPosition="-2" />

Which would be the same as...

<eLabel position="0,1020" size="1920,60" backgroundColor="black" zPosition="-2" />

 

There are other chars that can be used in a formula... See here...

https://github.com/O...in.py#L211-L232

 

To see a few examples of formulas in action have a look here...

https://github.com/o...kin_default.xml


Edited by Huevos, 25 March 2021 - 00:13.


Re: Separate characters instead of regular numbers. #8 Loui (PD1LOI)

  • Senior Member
  • 4,529 posts

+140
Excellent

Posted 26 March 2021 - 09:25

"e" means end. So "e-14" means 14px less than the dimension of the parent element.

 

So say you want to create 60 px high horizontal background at the bottom of the screen  to hover your button texts over...

<eLabel position="0,e-60" size="e,60" backgroundColor="black" zPosition="-2" />

Which would be the same as...

<eLabel position="0,1020" size="1920,60" backgroundColor="black" zPosition="-2" />

There are other chars that can be used in a formula... See here...

https://github.com/O...in.py#L211-L232

 

To see a few examples of formulas in action have a look here...

https://github.com/o...kin_default.xml

Thank you for the explanation.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users