- Sep 30, 2018
- 102
- 70
Hi guys,
another trouble with the following code.
The first idea was to use a variable to display one picture : that's allright.
But now I have to resize the picture because container or displayable does'nt respect the original size. And there, the scale function doesn't understand my variable ?
Of course, with FactorScale, if i replace [idSpeaker] by myPicture, everything works fine .
An idea, a dream, a cup of tea ?
another trouble with the following code.
The first idea was to use a variable to display one picture : that's allright.
But now I have to resize the picture because container or displayable does'nt respect the original size. And there, the scale function doesn't understand my variable ?
Code:
.../...
define idSpeaker = "myPicture"
.../...
vbox:
yalign 1.0
window:
style "vbox_window"
text what id "what"
# THIS CODE IS OK, ADD READ VARIABLE idSpeaker
# add "images/characters/[idSpeaker].jpg" xalign 0.0 yalign 0.5
# BAD : FactorScale doesn't translate variable
add im.FactorScale("images/characters/[idSpeaker].jpg",87,113) xalign 0.0 yalign 0.5
# Couldn't find file 'images/characters/[idSpeaker].jpg'
An idea, a dream, a cup of tea ?
Last edited: