Documentation (unit details) resizing IMPLEMENTED

Suggestions about the gameplay, the controls, buttons and so on.
Post Reply
User avatar
Endru1241
Posts: 304
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Documentation (unit details) resizing IMPLEMENTED

Post by Endru1241 » Wed Sep 18, 2019 7:43 pm

In unit/building details page the whole frame resizes to be too wide when unit has animation (actually any many frame graphics).
Shouldn't different settings in unit visuals definition be read and applied?
To make it simpler just read number of columns in "type":"DEFAULT" and image definition to take only first one for documentation.
To see castle stats we don't really have to view all produced units animation frames (neither occupied/non occupied images is needed, but new image split way deals with that already).

Stratego (dev)
Site Admin
Posts: 9404
Joined: Fri Apr 25, 2014 9:28 pm

Re: Documentation (unit details) resizing

Post by Stratego (dev) » Wed Sep 18, 2019 7:52 pm

lol. sure it is not good, it is not easy to solve as that is a html template (u see it under templates), not within the app, but a in-game-browser shows that html

in template there should be the image placed cropped to good size - bit still should work for all image sizes, double and mega castle too :)

in tp_propsheet here is the image:

<tmpl_if up_img>
<img src="<tmpl_var up_img>" />
<tmpl_else>
<img src="<tmpl_var up_img_double>" />
</tmpl_if>

maybe some sizing would help, but i have never hassled with it.

User avatar
Endru1241
Posts: 304
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Documentation (unit details) resizing

Post by Endru1241 » Wed Sep 18, 2019 8:27 pm

I doubt anything can be achieved by html here.
The question is what and when is supplied to main document (do I understand it right, that there is one huge html file generated, then by javascript document.getElementById(a) a correct branch is selected?). I mean - if in up_unit_type_img variable already processed image would be stored, then there is no problem.

Stratego (dev)
Site Admin
Posts: 9404
Joined: Fri Apr 25, 2014 9:28 pm

Re: Documentation (unit details) resizing

Post by Stratego (dev) » Wed Sep 18, 2019 8:43 pm

no we can only reference files in asset folder.

the small statsheed is generated by templating (filling up with data)
and the big help uses this little generatedthings to copy into a whole big html.

we can try making in html size constraints for the image, orr putting it into a div and restrict size - you can try if u have a little affinity, with modding you can instantly test it.

User avatar
Endru1241
Posts: 304
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Documentation (unit details) resizing

Post by Endru1241 » Thu Sep 19, 2019 11:11 pm

I remembered right that nothing can be achieved by html alone. Forgot, about css.
So, you were right. It could be done in html file.
I did it (will be added in the next pack).

Stratego (dev)
Site Admin
Posts: 9404
Joined: Fri Apr 25, 2014 9:28 pm

Re: Documentation (unit details) resizing

Post by Stratego (dev) » Fri Sep 20, 2019 5:26 am

You are awesome! please send me the file itself as i need to put it into toher variants - thanks!

User avatar
Endru1241
Posts: 304
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Documentation (unit details) resizing

Post by Endru1241 » Fri Sep 20, 2019 6:14 pm

Sent on e-mail. Forum doesn't allow html attachments.

Post Reply

Return to “Gameplay & UI”