Nifty GUI Problem

1 reply [Last post]
Offline
Joined: 11/18/2012

ImageSelect properties


imageWidth(String);

imageHeight(String);


those attributes cannot be recognized is there another way to set the width and height ?

Offline
Joined: 12/13/2010
Had to dig deep into the

Had to dig deep into the nifty javadoc, and this is for version 1.3 of nifty:

import de.lessvoid.nifty.tools.SizeValue; 
import de.lessvoid.nifty.controls.imageselect.builder.*;  
. 
. 
.  
control(new ImageSelectBuilder("someImageSelect") {{
    
            setImageWidth(new SizeValue("100px"));
            setImageHeight(new SizeValue("100px"));
            addImage("textures/doty.png");
            addImage("textures/doty_happy.png");
        }});