Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animation only starts after key press if user input requested before menu is displayed #208

Closed
steve6375 opened this issue Sep 1, 2019 · 10 comments

Comments

@steve6375
Copy link

steve6375 commented Sep 1, 2019

If I set up an animation but have a set /p ask=enter a number in the .cfg file before any title or iftitle lines

#code here to start animation

call Fn.70 3
clear
echo [1985]
set /p ask=Enter a number
set /p ask=Enter another number

title xxxx
etc.

then the wallpaper is displayed on the screen and the prompt appears
Enter a number
but the animation does not display.

However, as soon as the user presses a key, then the animation plays.

When the user presses ENTER key, the next prompt appears:
Enter another number
and the animation pauses until the user presses a key - then it starts again.

Is there any way to make the animation play before the question is asked?

image
User presses any key (2) and animation plays
image

@steve6375
Copy link
Author

steve6375 commented Sep 2, 2019

P.S. If I call a grub4dos batch file instead of using set /p line
then the animation plays immediately after the password prompt.

!BAT
# animation plays immediately...
password fred

so the code in the password entry routine allows animation to play but set /p does not allow animation to play.

set /p stopping animation is only a small issue but it would be nice if there was an easy fix.
'pause' command also does not show animation.

@yaya2007
Copy link
Collaborator

yaya2007 commented Sep 2, 2019

Add to the menu
write --bytes=1 0x835b 1

Put the batch file "before_title" in the root directory
grldr.rar.txt

@steve6375
Copy link
Author

I can't seem to get it to work.

Does
write --bytes=1 0x835b 1
have to be issued before the splashimage --animated=0x90=10:ms=90=590=300 (5)/e2b/sphereR_frame_0001.jpg command?

when set /p ask=bbb is executed - the animation does not start until I press a key.

Can you explain what it does and how it works please?

@yaya2007
Copy link
Collaborator

yaya2007 commented Sep 2, 2019

来回翻译太麻烦,就用中文了,见谅。
不太明白你的本意。为什么要用户输入数字,才开始播放动画?再输入数字停止播放?
你可以在指定的批处理文件,书写合适的语句,以达到你自己的目的。
set /p .....
当输入数字时,它并不工作,直到按回车才执行。
这时播放动画。动画不是独占模式,紧接着执行下一条
set /p.....
等待输入。随意输入数字,解锁屏幕,动画正常播放。

@steve6375
Copy link
Author

steve6375 commented Sep 2, 2019

No
My intention is to display a wallpaper which asks user a question and display an animation
as soon as the set /p is executed, I want the animation to start so that the user sees both the wallpaper and the animation.

BUT - currently the animation does not start when set /p waits for input

HOWEVER - as soon as the user presses any key (a-z, 0-9, * any key) then the animation plays.

I want the animation to play immediately after set /p so user sees animation before any input.

@yaya2007
Copy link
Collaborator

yaya2007 commented Sep 2, 2019

明白你的意图了。
另外我想知道,测试动画时,菜单背景图已经加载了?

@steve6375
Copy link
Author

yes, background has been loaded with splashimage and then call Fn.70 3 is used to show it - as in the menu in first post.

@yaya2007
Copy link
Collaborator

yaya2007 commented Sep 3, 2019

OK, please test it.
grldr.rar.txt

@steve6375
Copy link
Author

🥇 That seems to work well. It works for pause and set /p. Was much code changed?
Should I check for possible bugs - if so in what areas - user input - password input - animation issues?

@steve6375
Copy link
Author

New grldr version seems OK. Will you create a new release version for this change please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants