It's not a huge peice of work; but I've been able to construct a
triangular grid (for game development) using XUL.

   http://clarkevans.com/triangular/demo.xul
   
The approach uses three "stacked" tables together with a PNG image 
that contains an opaque isosceles triangle on an otherwise transparent
background.

1. the first grid draws every-other triangle via a the PNG; half
   of the PNG image is transparent 

2. the second grid has exactly the same dimentions as the first
   grid, only it is offset vertically by 50%; it draws the 
   remaining triangles

3. the third grid is offset 25% both horizontally and vertically,
   with 1/2 the row/col width (giving 4x as many squares)
   
This draws a triangular grid, and every-other square in the third
(to-most) grid is a "clickable" region that uniquely identifies a 
given triangular area.  The next version of this triangular grid
will have drag & drop ability.

Have Fun and Enjoy!

Clark 

P.S. I'm now looking for some way to add drag & drop to this
     grid -- if you know how, could you please drop me a line?


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org  
_______________________________________________
xul-talk mailing list
xul-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xul-talk

Reply via email to