I’m trying to change the text in a UI. I followed the tutorial but it’s not working. I was wondering what I am doing wrong.
My UI:
[java]<?xml version=“1.0” encoding=“UTF-8”?>
<nifty xmlns=“http://nifty-gui.sourceforge.net/nifty.xsd” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://nifty-gui.sourceforge.net/nifty.xsd http://nifty-gui.sourceforge.net/nifty.xsd”>
<useControls filename=“nifty-default-controls.xml” />
<useStyles filename=“nifty-default-styles.xml” />
<popup id=“feedback” controller=“dae.repest.gui.controllers.FeedbackScreenController” visibleToMouse=“true” childLayout=“center”>
<panel style=“repest” width=“400px” height=“300px” x=“100px” y=“600px” childLayout=“vertical” padding=“20px”>
<text id=“feedbacktext” name=“feedbacktext” text="${CALL.getFeedback()}" font=“fonts/comicbook_32.fnt” width=“95%” height=“100%” align=“left” wrap=“true” />
<control name=“button” label=“Ok” y=“100%” align=“right”>
<interact onClick=“ok()”/>
</control>
</panel>
</popup>
</nifty>
[/java]
My controller:
[java]/*
- To change this template, choose Tools | Templates
- and open the template in the editor.
*/
package dae.repest.gui.controllers;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;
/**
*
-
@author odjansse
*/
public class FeedbackScreenController implements ScreenController {public String getFeedback(){
return "test";
}
@Override
public void bind(Nifty nifty, Screen screen) {}
@Override
public void onStartScreen() {}
@Override
public void onEndScreen() {}
}
[/java]