oO It should be the other way round, two weeks ago nifty had references to AWT, now not anymore⦠Try deleting all files from the ālibā directory of the android project if you use the SDK, maybe the old nifty files are still there (if you use the SDK).
I had the same issue today. I updated the SDK this morning and then created a new test project tonight. The project works on the PC, but when run on Android I get the same type of error. This was my first attempt at a Nifty screen on Android, so I donāt have any previous experience with Nifty.
The nifty jar libraries that are being imported should have no version numbers in their name, can you make sure that is the case? Also, did you try deleting all files from the ālibā directory of the android project (āmobileā folder)?
I originally created a new project tonight after updating the SDK this morning. I also just deleted all the files in mobile=>libs and rebuilt. Same result.
I checked the jar filenames in mobile=>libs and did not see any version numbers in the filenames.
No ⦠Its because you load it the way you do. Using ājava.awt.datatransfer.Clipboard.classā essentially forces the class to load so when you call Class.forName() the class is already loaded. You have to pass a string, not a class object, to that method and then it will load it in the right way. E.g.:
I updated the platform today and tried this again. I was plenty surprised that my Hello Nifty box showed up on the phone. Thanks for making the changes!
Will do. I should be able to get through some of them in the next day of two. Iāve never attached pics on a post before. Do you have to upload them to imgur with the upload button?
when I touch the screen so I think the āclickā is seen by nifty, but the event doesnāt fire. Iām going to try a bigger button to see if itās just too small and the touch isnāt actually on the button.
No dice. Nice big fat button and still nothing. When I drag my finger within the button I get the same message in the ADB log and the flyCam moves like I was not touching the button.
In the file com.jme3.niftygui.InputSystemJme the x and y values being passed to nifty are only getting updated in onMouseMotionEventQueued. Since the phone doesnāt have mouse motion, the x and y stay 0. I added some code to set the x and y values on the touch event and it is working now. Iām not sure this is the right way to fix the issue. Maybe someone can review and determine if there should be a different way to fix it.
[java]
public void onTouchEvent(TouchEvent evt) {
x = (int) evt.getX();
y = (int) (height - evt.getY());
}
[/java]
[EDIT] This isnāt the right way to fix this. I have to hit the button twice to get the action to fire. The first time I hit the button, the button becomes āselectedā and a border shows up around the button. If I touch the button a second time, the event fires.
Can someone look at this and see what the right way to fix it is?
Sorry, discovered that with the patch above and you drag over the button and lift your finger, the button became active. The patch below removes that problem. I think Iām done. Sorry for the multple patches.
[java]
This patch file was generated by NetBeans IDE
Following Index: paths are relative to: D:UserspotterecDocumentsjMonkeyProjectsjME3srcniftyguicomjme3niftygui
This patch can be applied using context Tools: Patch action on respective folder.
It uses platform neutral UTF-8 encoding and n newlines.
Above lines and this line are ignored by the patching process.
Index: InputSystemJme.java
ā InputSystemJme.java Base (BASE)
+++ InputSystemJme.java Locally Modified (Based On LOCAL)
Shouldnāt dragging (using the touchscreen) be supported as well? Also why regular mouse events do not work? They are supposed to be āemulatedā when running under Android