Jump to content
Sign in to follow this  
LurchiDerLurch

Focus controls in a dialog problem

Recommended Posts

Hello,

I don't like dialogs. And they don't like me....

I'm simply creating a dialog which looks like this:

arma2oa2011-10-1117-30cuxb.png

And with

ctrlShow [idc, true];

I hide/show the needed controls. So far everything works fine. Now I want a little popup window and let it show with the above code:

arma2oa2011-10-1117-311u5x.png

Looks pretty nice but the edit boxes and buttons won't focus if I click on them with the mouse...

if I force focus with ctrlSetFocus the edit box works just fine... but why can't the mouse focus them??

I have to mention that I had to call ctrlSetFocus on the map so the player is able to click on it and use it...

Do you need any code?

Thank you in advance ;)

Share this post


Link to post
Share on other sites

Hi,

Make sure the Edit resources aren't behind something, even a invisible text background resource could be the cause of the problem.

_neo_

Share this post


Link to post
Share on other sites

Good point.

Here the code from the class of the whole dialog:

	controls[] = 
{
	/*Bottom*/ 
		/*Background*/
		LDL_background, 

		/*AC130 Display*/
		LDL_lO, LDL_rO, LDL_lU, LDL_rU, LDL_Cross, LDL_Range, LDL_Center, LDL_Center2, LDL_HorFrame, LDL_VerFrame, LDL_HorBar, LDL_VerBar, LDL_North, LDL_East, LDL_South, LDL_West, 
		TargetText, Target, Target1, Target2, Target3, Target4, Target5, Target6, Target7, Target8, Target9, Target10,

		/*UAV Display*/

		LDL_Circle, 			

		/*Map*/
		LDL_Map, LDL_edit_back, LDL_edit_head, LDL_edit_radiusEdit, LDL_edit_cancel, LDL_edit_ok, LDL_edit_radiusText, LDL_edit_heightText, LDL_edit_heightEdit,

	/*Middle*/ 

		/*Frame*/
		LDL_blackscreen, LDL_Display, LDL_mouseHandler, 


		/*AC130_COOP Overlay*/
		text_m,

	/*Top*/ 

		/*Buttons*/
		LDL_t1,LDL_t2,LDL_t3,LDL_t4,LDL_t5, LDL_b1,LDL_b2,LDL_b3,LDL_b4,LDL_b5, LDL_r1,LDL_r2,LDL_r3,LDL_r4,LDL_r5, LDL_l1,LDL_l2,LDL_l3,LDL_l4,LDL_l5

};

The Edit boxes are:

/*Map*/

LDL_Map, LDL_edit_back, LDL_edit_head, LDL_edit_radiusEdit, LDL_edit_cancel, LDL_edit_ok, LDL_edit_radiusText, LDL_edit_heightText, LDL_edit_heightEdit,

So

/*Frame*/

LDL_blackscreen, LDL_Display, LDL_mouseHandler,

Is over it...... but what if I need those? I'll try to delete them later for trsting purpose :)

edit: now I had an idea... if it turns out to be that problem i could simply move the popup on the top of all? that would be the smartest solution... thanks for the hint ;) I'll try that out

Edited by LurchiDerLurch

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  

×