A few question on ToneGod gui

Hello, i have been working a bit whit tonegod gui and even if i love it so far i do have some problem whit it.

First i must say that the tutorial page do have a couple of problem. Some of the topic are empty, and some are just incomplete. Take for exemple the button section. I can’t instantiate the button, and many other feature presented in this tutorial and so far the only way i have been able to create any button is by using the Button Adapter class. Don’t get me wrong, the Button Adapter work just fine, but why is it not in the tutorial menu when it work and the button cannot be instantiated?

second, i have been trying to change the police on the Text Field and the Label but i simply can’t find how. I typed toneGodGui change police on google but no answer came. I would also like to change the animation on the Textfield and button when i hover/click on it but i can’t find how. Those animation are okay for development but they are WAY too aggressive for anything professional. The radio button also only work once, cause after i click then i can’t click on then again, and why is the text i wrote for radio button IN the radio? i had to make a new label to put the simple information i had on the side of the radio

If anyone could help me or point me in the right direction i would really appreciate it. I really love tonegod but all those question/problem are killing me right now x)

Regarding the RadioButton label, don’t use setText(), use setLabelText()

[java]
RadioButton r1 = new RadioButton(screen);
r1.setLabelText(“Option A”);
[/java]

This is because RadioButton extends button, and setText() method would set the text inside the button (if it had some). Both RadioButton and CheckBox already contain a separate Label element that you can get at with getLabel(). Using setLabelText() is a convenience method for

[java]getLabel().setText(“Option A”)[/java].

There are 2 ways I know of to change animations, the first is alter it in the .style.xml file (if you don’t already have your own set of styles you will need to make one).

Many controls have an effects section …

[java]
<effects>
<property name=“event0” type=“Effect”>
<event value=“Hover” />
<effect value=“Pulse” />
<speed value=".3" />
</property>
<property name=“event1” type=“Effect”>
<event value=“Press” />
<effect value=“ImageSwap” />
<speed value=“0” />
</property>
<property name=“event2” type=“Effect”>
<event value=“LoseFocus” />
<effect value=“ImageSwap” />
<speed value=“0” />
</property>
<property name=“event3” type=“Effect”>
<event value=“TabFocus” />
<effect value=“PulseColor” />
<speed value=".3" />
</property>
<property name=“event4” type=“Effect”>
<event value=“LoseTabFocus” />
<effect value=“ColorSwap” />
<speed value=“0” />
</property>
</effects>
[/java]

Another way is to alter effects directly by using Element.getEffect(), or Element.removeEffect(), and Element.addEffect().

RR

1 Like

Thanks a lot! Now that i have this plus the font information i should be good!

One last thing : how could i remove the thing at the top of the window. the one that when you drag make move the window

Use Panel instead of Window. It should be exactly the same, but without the bar at the top.

1 Like

Indeed, that seem to be working great. What is the difference between panel and window then?

I believe that the only difference is Window has that bar at the top–it looks like a traditional Window that you’d find in an OS, etc. with a title bar. Panels simply lack a title bar.

@SimonBedard said: Hello, i have been working a bit whit tonegod gui and even if i love it so far i do have some problem whit it.

First i must say that the tutorial page do have a couple of problem. Some of the topic are empty, and some are just incomplete. Take for exemple the button section. I can’t instantiate the button, and many other feature presented in this tutorial and so far the only way i have been able to create any button is by using the Button Adapter class. Don’t get me wrong, the Button Adapter work just fine, but why is it not in the tutorial menu when it work and the button cannot be instantiated?

second, i have been trying to change the police on the Text Field and the Label but i simply can’t find how. I typed toneGodGui change police on google but no answer came. I would also like to change the animation on the Textfield and button when i hover/click on it but i can’t find how. Those animation are okay for development but they are WAY too aggressive for anything professional. The radio button also only work once, cause after i click then i can’t click on then again, and why is the text i wrote for radio button IN the radio? i had to make a new label to put the simple information i had on the side of the radio

If anyone could help me or point me in the right direction i would really appreciate it. I really love tonegod but all those question/problem are killing me right now x)

If you could possibly highlight where/what on the tutorial pages you feel are lacking or what you feel would help you get started i’d really appreciate it. Am looking to update these. Thanks!