Skip to content

Commit 6591597

Browse files
kilbithrubenwardy
authored andcommittedFeb 8, 2021
Fix animation_image support in scroll containers
1 parent 857dbcd commit 6591597

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎games/devtest/mods/testformspec/formspec.lua

+1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ local scroll_fs =
227227
"box[1,1;8,6;#00aa]"..
228228
"scroll_container[1,1;8,6;scrbar;vertical]"..
229229
"button[0,1;1,1;lorem;Lorem]"..
230+
"animated_image[0,1;4.5,1;clip_animated_image;testformspec_animation.png;4;100]" ..
230231
"button[0,10;1,1;ipsum;Ipsum]"..
231232
"pwdfield[2,2;1,1;lorem2;Lorem]"..
232233
"list[current_player;main;4,4;1,5;]"..

‎src/gui/guiFormSpecMenu.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ void GUIFormSpecMenu::parseAnimatedImage(parserData *data, const std::string &el
928928

929929
core::rect<s32> rect = core::rect<s32>(pos, pos + geom);
930930

931-
GUIAnimatedImage *e = new GUIAnimatedImage(Environment, this, spec.fid,
931+
GUIAnimatedImage *e = new GUIAnimatedImage(Environment, data->current_parent, spec.fid,
932932
rect, texture_name, frame_count, frame_duration, m_tsrc);
933933

934934
if (parts.size() >= 7)

0 commit comments

Comments
 (0)
Please sign in to comment.