Results 1 to 12 of 12
  1.    #1  
    Starting to dabble with the SDK and have a simple question that I can't seem to figure out

    How do I set the backgound image ? I've tried a few things and all I can get right now is the grey background that is default. I have a simple scene with a header and about 5 buttons on. Would just like to have a graphic for the background.

    Would appreciate any help/pointers
  2.    #2  
    Making some progress but still not right

    Here is the code in my scene:

    Code:
    <div class="precaddie-backdrop">
    <div class="palm-header">Pre Golf Caddie</div>
    <div class="palm-header-spacer"></div>
    <div id="Preferences" name="Preferences" x-mojo-element="Button"></div>
    <div id="Players" name="CreatePlayer" x-mojo-element="Button"></div>
    <div id="Courses" name="CreateCourse" x-mojo-element="Button"></div>
    <div id="NewRound" name="NewRound" x-mojo-element="Button"></div>
    <div id="PrevRounds" name="PrevRounds" x-mojo-element="Button"></div>
    </div>
    And the code in my css file:

    Code:
    .precaddie-backdrop
    {
    	background: black url(../images/precaddie-backdrop.png) no-repeat;
    }
    Have also attached a pic of what the screen looks like. As you can see, the image is not going all the way to the end of the screen. The image is 320x480 in size.
    Attached Images Attached Images
  3. #3  
    Code:
    body.palm-default
    {
    	background: url(../images/backdrop.png) center center;
    }
  4.    #4  
    oil,

    Thanks for that. That did the trick. Just doubled checked in the rough cuts document and nothing in there about the body.palm-default style. Where did you find out how to do that ?
  5. #5  
    It's in the 'style matters' app.
  6.    #6  
    Ok. Thanks for that Oil Guess there is going to be a lot to learn right now. Still, will give me something to do whilst waiting until I can buy the Pre
  7. #7  
    Quote Originally Posted by davetati View Post
    Ok. Thanks for that Oil Guess there is going to be a lot to learn right now. Still, will give me something to do whilst waiting until I can buy the Pre
    LOL. I'm right there with you davetati. Just... waiting... >.<
  8.    #8  
    It's a bugger isn't it SirataXero ? At least my wife has a Pre and I can at least get to play with that every now and again. Well, when she let's it out of her hands that is .. ROFL.
  9. #9  
    hahaha. I'm so jealous. All i've got to play with is the emulator. And play with it I do. I leave my laptop on every day for over 9 hours just to have my own "Pre". haha.

    I also have stopped checking my different email accounts, and didn't even configure Outlook for them after I reinstalled. My wonderful virtual Pre takes care of it all for me.

    I can't WAIT to have it in my hands. haha.
  10.    #10  
    Actually, another question. How can I set the background programatically during the assistant prototype.activate ?
  11. #11  
    I would probably do it by setting up multiple body.CLASSNAMEHERE { } styles with different background url's. Then use:
    Code:
    $$('body')[0].addClassName('CLASSNAMEHERE');
    Or you could:
    Code:
    $$('body')[0].style.background="url('../images/asdf.png')";
    But I think the first one is cleaner. And to to change the images requires only editing the css, and not the code (what css is for.)
  12.    #12  
    Thanks Oil. That worked just great You're the man.

Posting Permissions