[Tutorial] Jiggy Text Magic

Discussion in 'Jiggy Runtime Development' started by The Ax, Apr 23, 2008.

  1. The Ax

    The Ax Banned

    Joined:
    Mar 11, 2008
    Messages:
    647
    Likes Received:
    22
    Well I have been seeing alot of post about programing wiith Jiggy and I thought I'd put in my two cents.

    Ok, In Jiggy there are 3 main ways to do text:
      • Text Label
      • Text Field
      • Text View
    • Key
      • Red=Function
      • Green=Word
      • Blue=Number
    First we will start with Text Label.
    Keep in mind "hello" is a variable which means mixing it with other variables wont work.
    //Code
    //UITextLabel
    Code:
    var hello = new UITextLabel( [ + 0 , 20 , window.bounds[ 2 ] - 10 , 60 ] );
    hello.text = "Jiggy Text Magic";
    hello.backgroundColor = [ 0 , 0 , 0 , 0.25 ];
    hello.setFont( new Font( "Trebuchet MS" , 2 , 46 ) );
    hello.color = [ 1 , 1 , 1 , 1 ];
    hello.centersHorizontally = true;
    hello.shadowColor= [0 , 0 , 0 , 1];
    hello.shadowOffset = true;
    mainView.addSubview( hello );
    
    Heres what each line does:
    1: Set Variable Name = Variable Type( [FromLeft , FromTop , windowbounds[numberofpagesoccupies] FromRight , Hight);
    2: Variable.Text ="TextHere"
    3:Variable.BacgroundColor = [red , green , blue , opacity];
    4: Variable.setFont( new Font( "FontNameHere" , Style , Size ) );
    5: Variable.color = [ red , green , blue , opacity];
    6: Variable.centersHorizontally = true or false;
    7: Variable.shadowColor = [red , green , blue , opacity];
    8: Variable.shadowoffset = true or false;
    9: MainView.addSubview(Variable)



    More Later
    Next we will move to the Text Field.
    Keep in mind "hello" is a variable which means mixing it with other variables wont work.
    //Code
    //UITextField
    Code:
    var hello = new UITextField( [ + 0 , 20 , window.bounds[ 2 ] - 10 , 60 ] );
    hello.text = "Jiggy Text Magic";
    hello.backgroundColor = [ 0 , 0 , 0 , 0.25 ];
    hello.setFont( new Font( "Trebuchet MS" , 2 , 46 ) );
    hello.color = [ 1 , 1 , 1 , 1 ];
    hello.centersHorizontally = true;
    hello.shadowColor= [0 , 0 , 0 , 1];
    hello.shadowOffset = true;
    hello.setPadding(20 ,40,20,440)
    hello.setInactiveHasDimAppearance(true)
    mainView.addSubview( hello );
    
    Heres what each line does:
    1: Set Variable Name = Variable Type( [FromLeft , FromTop , windowbounds[numberofpagesoccupies] FromRight , Hight);
    2: Variable.Text ="TextHere"
    3:Variable.BacgroundColor = [red , green , blue , opacity];
    4: Variable.setFont( new Font( "FontNameHere" , Style , Size ) );
    5: Variable.color = [ red , green , blue , opacity];
    6: Variable.centersHorizontally = true or false;
    7: Variable.shadowColor = [red , green , blue , opacity];
    8: Variable.shadowoffset = true or false;
    9: Variable.setpadding = ( [FromTop , FromTop , FromBottom, Right);
    10:Variable.setInactiveHasDimAppearance = (true or false);
    11: MainView.addSubview(Variable)
  2. hockeypanda32

    hockeypanda32 Well-Known Member

    Joined:
    Dec 18, 2007
    Messages:
    2,183
    Likes Received:
    89
    Device:
    iPhone 4 (Black)
    Thanks, this is really cool actually! I just learned how to make a shadow

    Please Register or Log in to view images

  3. The Ax

    The Ax Banned

    Joined:
    Mar 11, 2008
    Messages:
    647
    Likes Received:
    22
    Me too lol
  4. The Ax

    The Ax Banned

    Joined:
    Mar 11, 2008
    Messages:
    647
    Likes Received:
    22
    finnally added some more basicaly the same

Share This Page