Results 1 to 2 of 2
  1.    #1  
    Okay so I am trying to create a basic app. It will be for COD:MW2 and will just list all the titles and emblems. But when you click the image, I want a little drop down (show/hide drawer) to show how to get it.

    My question is - How do I replace a button with an image?

    Forgive me if this is a lame question - I am brand new to developing.

    Thanks in advance!
  2. #2  
    css:

    Code:
    .imgbutton {
    	position:absolute;
    	left:10px;
    	top:330px;
    	width:90px; 
    	height:90px;
    	background: url(../images/imgbutton.png) no-repeat center ;
    	padding: 0px 0px 0px 0px;
    	float:left;
    }
    i'm positioning my "buttons" in specific places on the screen.

    scene html:

    Code:
    <div id="button1" class="imgbutton"></div>
    use the class defined in the css.

    assistant:

    Code:
    Mojo.Event.listen(this.controller.get($("button1")), Mojo.Event.tap, this.button1.bind(this));
    create a function button1 that will be your logic when the button is tapped.
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix

Posting Permissions