MagicWall
Veteran OT User
- Joined
- Oct 12, 2008
- Messages
- 124
- Solutions
- 6
- Reaction score
- 344
Similar to responsive web page design, I want make similar system in OTClient.
I was able to make functions similar to CSS:
Ok, so what they look like in real:
Why OTClient flash?
Because I resize application window and it's normal.
Try yourself if you don't belive
How it's working?
Similar to CSS, so I check "parent" width/height and compute percent from this value.
On gif you see that ingame window change they size, and element (child of ingame window -> top arrow) inside change size too. Because both elements ingame window and top arrow have percentagle paramether.
game window <- is parent of - ingame window <- is parent of - top arrow
Element have % of width/height his parent.
Probably I soon add this code to github.
I was able to make functions similar to CSS:
Code:
width: 50% -> widthPercent(50)
height: 30% -> heightPercent(30)
Ok, so what they look like in real:
Why OTClient flash?
Because I resize application window and it's normal.
Try yourself if you don't belive
How it's working?
Similar to CSS, so I check "parent" width/height and compute percent from this value.
On gif you see that ingame window change they size, and element (child of ingame window -> top arrow) inside change size too. Because both elements ingame window and top arrow have percentagle paramether.
game window <- is parent of - ingame window <- is parent of - top arrow
Element have % of width/height his parent.
Probably I soon add this code to github.