Book a Demo

Author Topic: Old notes problem resolved  (Read 1949 times)

Dima

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Old notes problem resolved
« on: January 27, 2010, 06:05:44 am »
I could not find my original post from few years ago... anyway - I needed a way to display some sort of a marker over an element if it had notes... well, my shape scripting skills got better and here is an example of what can be done. This also uses "Status" property to change marker color.

Code: [Select]
shape main
{
      drawnativeshape();
      if (HasProperty("Notes", ""))
      {
      }
      else
      {
            if (HasProperty("Status", "Approved"))
            {
                  addsubshape("green", 25, 5);
            }
            else
            {
                  addsubshape("yellow", 25, 5);
            }
      }
    shape green
    {
         setfillcolor(50, 200, 100);
         rectangle(10,10,100,100);
    }
    shape yellow
    {
         setfillcolor(255, 255, 0);
         rectangle(10,10,100,100);
    }

}

hope this helps someone...