[22 Mar 2007] HW2.5 checkEvent / MakeButton
Posted: Sat Jun 13, 2020 5:31 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on 22 Mar 2007 11:28:54 +0100
Hello everybody,
as a new owner of HW2.5 I tend to adopt my current project to it. What annoys me is that the function CheckEvent() is no longer supported, but I will find a way around it.
A more serious problem comes with the reaction to events triggered with buttons. When starting my script my menu is displayed with different buttons to trigger. This leads to a new screen which isn't displayed under 2.5 HW moans the following: "Falsche Benutzung/Argumente für diesen Befehl! überprüfen Sie die Dokumentation! Datei: config.hws ( aktuelle Zeile: 35 - In Funktion: WaitEvent)
Here the codesnippet:
The same construct works with the main menu, but for what reason does it fail in the submenus? The "ActionListener" from the main menu isn't deactivated does that cause any conflict?
Regards GMKai
Hello everybody,
as a new owner of HW2.5 I tend to adopt my current project to it. What annoys me is that the function CheckEvent() is no longer supported, but I will find a way around it.
A more serious problem comes with the reaction to events triggered with buttons. When starting my script my menu is displayed with different buttons to trigger. This leads to a new screen which isn't displayed under 2.5 HW moans the following: "Falsche Benutzung/Argumente für diesen Befehl! überprüfen Sie die Dokumentation! Datei: config.hws ( aktuelle Zeile: 35 - In Funktion: WaitEvent)
Here the codesnippet:
Code: Select all
Function p_Settings()
EnableLayers()
DisplayBGPic(10)
LoadBrush(12,"gfx/but_diff.png")
settingsmenu = 1
menuisactive = 0
DisplayBrush(11,#Left,#Top)
evtSmatch = { OnKeyDown = p_SettingsMenuFunc, OnMouseUp = p_SettingsMenuFunc }
/*back to main menu*/
MakeButton(11,#SimpleButton, 0, 0,100,100,evtSmatch)
SetFillStyle(#FillNone)
/*change difficulty*/
MakeButton(12,#SimpleButton, 50,100,50,50,evtSmatch)
p_ChangeDiffBrush()
p_InitFonts()
/*inputkeys*/
MakeButton(13,#SimpleButton, 50,175,50,50,evtSmatch)
DisplayBrush(13,50,175)
/*playername*/
MakeButton(14,#SimpleButton,250,175,50,50,evtSmatch)
DisplayBrush(14,250,175)
/*save*/
MakeButton(15,#SimpleButton, 50,250,50,50,evtSmatch)
DisplayBrush(15,50,250)
/*load*/
MakeButton(16,#SimpleButton,125,250,50,50,evtSmatch)
DisplayBrush(16,125,250)
/*default*/
MakeButton(17,#SimpleButton,200,250,50,50,evtSmatch)
DisplayBrush(17,200,250)
/*Display Controls*/
MakeButton(18,#SimpleButton,150,175,50,50,evtSmatch)
DisplayBrush(18,150,175)
Repeat
WaitEvent ; IT JUMPS OUT AT THIS POINT
Forever
EndFunction
Regards GMKai