Lumer GUI for help


#1

1.Can anyone tell me how to increase the size of the button:

Button MyButton = myWindow.addChild(new Button(“Start”));

  1. Is there any other way to let BitmapText’s text size get bigge? I tried setSize() but the font will be very blurry.

#2

Do you want the text bigger or the button bigger?

You can use setPreferredSize() to force the button to want to be bigger… it won’t grow the text though.

If you want bigger text without blurriness then you need to generate a bigger font.


#3

Hello, I want the text and button both be bigger.
I tried MyButton.setPreferredSize(2f,2f,0); But there is error when compile it.


#4

The error information is probably important. My guess is that it’s telling you exactly what’s wrong.


#5

method setPreferredSize in class Panel cannot be applied to given types;
required: Vector3f
found: float,float,float
reason: actual and formal argument lists differ in length

How should I change it?


#6

Well, it’s telling you to change:

To:


#7

What is Vector3f? Any example?


#8

https://wiki.jmonkeyengine.org/tutorials/math/assets/fallback/index.html


#9

https://javadoc.jmonkeyengine.org/com/jme3/math/Vector3f.html

…you might be starting in the deep end of the pool.


#10

Change: setPreferredSize(a,b,c)

To: setPreferredSize(new Vector3f(a,b,c))


#11

“Lumer”? “There is error when I compile it”?

@normen I know it’s you with an alt account, please stop trolling


#12

Hehe, nah - but good to see that @mentions still work, I usually only get PMs from the forum saying “I need this done quickly plz, kthxbye” :chimpanzee_neutral: