Mouse API pros and cons?

Well hey, since there’s a new forum category that needs to get used, I’ll take the opportunity to ask a low-priority question that I’m curious about.

I’m working on a project that uses picking and studying the code examples. Among them, I find two different mouse event handling APIs: kha.input.Mouse and iron.system.Input.

My question is, what are the differences? Are there use cases to prefer one or the other, is one more stable and supported than the other, is one newer/more forward facing? I love the idea of having choices, but any guidance on which to focus on is welcome.

Thanks!

1 Like

In general, in what limited interaction that I’ve had so far with the similar interfaces among Kha and Iron, I think the Iron API is going to be a little bit more integrated with the Armory strategy of doing things while the Kha API is going to target low-level direct access to the backing hardware/software API. They may not be all that different, but I think if you are working on an Armory game, I would opt to use the Iron API, just in case it is doing something extra to integrate it with the rest of the system.

There shouldn’t be any difference in the “newness” or power of the APIs; the Iron API is actually just making Kha API calls to accomplish its work. Iron might be a little bit more friendly, if Lubos wanted to wrap the Kha API to make it easier to use or to make it more targeted to the workflow he was designing for Armory.

4 Likes

I see. That makes sense. Thanks very much!

1 Like