« Return to Thread: Would like to make a small addition to Pipmak

Re: Would like to make a small addition to Pipmak

by Christian Walther :: Rate this Message:

Reply to Author | View in Thread

rivenwanderer wrote:
> http://www.nabble.com/file/p20287577/defaults.lua defaults.lua
> OK, that was easier than I'd expected!  I've uploaded my implementation
> (assuming the Nabble interface does what I want).  The tabs may be wrong,
> and the nesting of if blocks is a bit messy, but it works :)

Cool, thanks for the contribution!

> I discovered that if you specify a handle with a negative azimuth, it draws
> properly when you show handles with "C", but the negative portion does not
> recognize your clicks to transfer you to the target node.  So I added a
> check to make sure that my center-referenced coordinates are always
> converted to positive azimuths (maybe this should be done for all azimuths?
> or should other work be done so that the click is recognized?)

Good point, I fixed this in revision 212
<http://pipmak.svn.sourceforge.net/viewvc/pipmak?view=rev&revision=212>.
Your suggestion is good - wrapping the left edge of the handle into the
range [0, 360) at creation time is more efficient than checking it
modulo 360 in the hit test function.

> I'd obviously like to see center-referenced handles make it into the
> official release at some point

Certainly - your change is in as revision 213 and will be included in
the next release. I made one small change (besides fixing the
indentation and adding documentation): assigning to handle.az is not
necessary in the panoramic case, Pipmak only ever uses handle.x (and
dito for el/y).

> but I saw that the
> pipmak_internal.handle(handle) function can be overridden by defining it in
> my own project's main.lua, which makes me happy :)

Well, yeah, but that's a bit hacky. Projects are not supposed to use
pipmak_internal (that's why it's called internal) and its contents may
change in arbitrary ways between releases, breaking your project.

  -Christian


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pipmak-Devel mailing list
Pipmak-Devel@...
news://news.gmane.org/gmane.games.devel.pipmak.devel
https://lists.sourceforge.net/lists/listinfo/pipmak-devel

 « Return to Thread: Would like to make a small addition to Pipmak