Jump to content
Sign in to follow this  
devildog664

Two complex GUI questions.

Recommended Posts

Hello so I got two question about GUIs so if someone can point me in the right direction or some useful threads it would be much appreciated. Was searching but did not find anything useful. 
 

1. is there a way I can make a scroll panel. What I mean by this is a panel that buttons and text is attached to but you can also scroll up or down with. Example hereScrollablePanel.PNG

 

2. How would one make an animated GUI or moving parts to a GUI. Like ACRE does with their radio knobs that turn. 
 

If anyone has examples of good threads that discuss this that would be amazing. Thanks in advance.

Share this post


Link to post
Share on other sites

1. You can place controls group and place your buttons in it, when total height of all buttons exceeds controls group height, scroll bar will appear.

2. Provably uses ctrlSetAngle to rotate knobs   

Share this post


Link to post
Share on other sites
23 minutes ago, devildog664 said:

2. How would one make an animated GUI or moving parts to a GUI. Like ACRE does with their radio knobs that turn. 

 

14 minutes ago, killzone_kid said:

2. Provably uses ctrlSetAngle to rotate knobs   

Nope, they actually made a bunch of pictures and animate them with a for "_i" loop and ctrlSetText
I did it for my team logo like this
 

params ["_ctrl"];
while {ctrlShown _ctrl} do {
for "_i" from 1 to 144 do {
	_string = "\TGV_Assets\paa\Logopaa\TGV(" +str _i + ").paa";
	_ctrl ctrlSetText _string;
	uisleep 0.05;
};
};

Takes a lot of pictures calculated in blender and converted to paa, long and tedious ^^

Share this post


Link to post
Share on other sites

Yes but this is not the same, the control is animated with different pictures the knob rotates as it would in a 3d model have a look here at 7'29 

 

Share this post


Link to post
Share on other sites

Works only with 3d controls which this isn't 

Share this post


Link to post
Share on other sites

No one stops anyone from providing custom radio models for a radio mod, sounds like you are looking for excuses to do things the hard way 

Share this post


Link to post
Share on other sites

Not my point : he asked how acre did it, this is how. Also a 3d control wouldn't have allowed for the other stuff they do in the gui for the radio. I've never made a 3D control so I'm not sure but I think you can't make them clickable and display custom text correct?

Share this post


Link to post
Share on other sites

The question was more general how do you animate gui. And yes you can do magic with 3D controls

Share this post


Link to post
Share on other sites
7 hours ago, killzone_kid said:

1. You can place controls group and place your buttons in it, when total height of all buttons exceeds controls group height, scroll bar will appear.

Wow that was easy I was trying to add a scroll bar to a control group haha. 

6 hours ago, Mr H. said:

 

Nope, they actually made a bunch of pictures and animate them with a for "_i" loop and ctrlSetText
I did it for my team logo like this
 


params ["_ctrl"];
while {ctrlShown _ctrl} do {
for "_i" from 1 to 144 do {
	_string = "\TGV_Assets\paa\Logopaa\TGV(" +str _i + ").paa";
	_ctrl ctrlSetText _string;
	uisleep 0.05;
};
};

Takes a lot of pictures calculated in blender and converted to paa, long and tedious ^^

Very interesting I would of thought there was more to it then just many pictures. 
Appreciate both answers for question 2. The more options the better so I’ll play around with these and see which one works best for my application. 

Share this post


Link to post
Share on other sites
18 minutes ago, devildog664 said:

Wow that was easy I was trying to add a scroll bar to a control group haha. 

Very interesting I would of thought there was more to it then just many pictures. 
Appreciate both answers for question 2. The more options the better so I’ll play around with these and see which one works best for my application. 

when whatever you put is in a controls group be aware that coordinates 0.0 are the top left corner of the group and not the screen coordinates (as for other non grouped controls).
as for acre you can check their github, this is the function that sets the image for the knob: https://github.com/IDI-Systems/acre2/blob/master/addons/sys_prc343/functions/fnc_render.sqf

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×