Author Topic: add compartment with shape script  (Read 3066 times)

Maggie

  • EA User
  • **
  • Posts: 106
  • Karma: +0/-0
    • View Profile
add compartment with shape script
« on: June 05, 2014, 10:51:45 pm »
Hi
I am trying to add a compartment to show the status of an element by am having some difficulties
My shape script is defined as
Code: [Select]
shape main

  {
//        SetFillColor(100,100,100);
            DrawNativeShape();
  
 

      addsubshape("statuscompartment", 100, 20);

        shape statuscompartment
            {

                  h_align = "center";

                  rectangle(0,0,100,100);

                  println("status: #status#");

            }
  }
This does display a compartment, but at the top of the element
How can I get the compartment displayed at the bottom of the element ?

Thanks

Maggie

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: add compartment with shape script
« Reply #1 on: June 05, 2014, 11:43:33 pm »
Try this:
Code: [Select]
shape main {
//        SetFillColor(100,100,100);
      DrawNativeShape();


      AddSubShape ("empty", 100, 80);
    addsubshape("statuscompartment", 100, 20);

      shape empty {}
      shape statuscompartment {
            h_align = "center";
            rectangle(0,0,100,100);

            println("status: #status#");
      }
}

q.

Maggie

  • EA User
  • **
  • Posts: 106
  • Karma: +0/-0
    • View Profile
Re: add compartment with shape script
« Reply #2 on: June 06, 2014, 12:28:36 am »
Thanks!!