Implementing a timer in Traveller game
Asked Answered
I

1

2

This problem is a continuation of what I started here. I'm using the asteroid example as a model to work from.

The problem I want to talk about here is the one of a timer. The asteroids example uses the event0 function to make one, which relies on the Graphics.UI.WX library. I don't want to use WX for this project. Could someone tell me what event0 is doing generally, so that I can figure out what I need to do to make a similar function?

Igal answered 27/9, 2012 at 16:29 Comment(0)
C
0

To bind reactive-banana to an external event-based framework, be it WX or any other, have a look at the Reactive.Banana.Frameworks module.

The event0 function from reactive-banana-wx is just a thin wrapper over the fromAddHandler function from said module. The example code for reactive-banana demonstrates its use.

Capsize answered 28/9, 2012 at 19:2 Comment(2)
Thanks for responding, Heinrich. I have re-visited the slot machine example for instruction on how to use fromAddHandler.Igal
Also at first glance, ActuatePause.hs looks instructive as well.Igal

© 2022 - 2024 — McMap. All rights reserved.