Jump to content

Home

ui help needed ...


Tchouky

Recommended Posts

well do anyome of you know how i could fill apart of the screen gving it s coordinates and the rgb values ???

 

is there a function like this in the quake code ???

i know there was one for HL but i don't know for Q3 !

 

thx it s for showing the color in my saber's color mod !

 

cause i tried to load pictures but i couldn't make it working ...

any help would be apriciated !

Link to comment
Share on other sites

There is a sort of sim. function in the JK2 Setup/Video2 menu, checkout setup.menu and search for gama_text and greyscale (greyscale.jpg), u can find the vars that are used in the menu files in ui_shared.c (the parse function is allso there).

 

Goodluck.

Link to comment
Share on other sites

well i ve checked your site and now i know that i have to use ownerdraw (i didn't relly want to but i have no choice...)

 

and another question ...

how can i load a shader on the screen i can't remember the fucntion ...

well ill find out but help as always would be apriciated.

 

btw we need a moderator in this coding forum .....

Link to comment
Share on other sites

can someone help me with this function :

void	trap_R_DrawStretchPic( float x, float y, float w, float h,  float s1, float t1, float s2, float t2, qhandle_t hShader )

 

well the 4 first arguments are the coordinates but the 2 others s1 and s2 ???

and t1 and t2 ????

what the hell are theses variables...

 

thx

Link to comment
Share on other sites

mmf.. perhaps this code will help?

 

void UI_DrawHandlePic( float x, float y, float w, float h, qhandle_t hShader ) {
float	s0;
float	s1;
float	t0;
float	t1;

if( w < 0 ) {	// flip about vertical
	w  = -w;
	s0 = 1;
	s1 = 0;
}
else {
	s0 = 0;
	s1 = 1;
}

if( h < 0 ) {	// flip about horizontal
	h  = -h;
	t0 = 1;
	t1 = 0;
}
else {
	t0 = 0;
	t1 = 1;
}

trap_R_DrawStretchPic( x, y, w, h, s0, t0, s1, t1, hShader );
}

Link to comment
Share on other sites

well thx !!

it s a bit too late but thx for trying to answer my question .

I used

trap_R_DrawStretchPic

 

 

directly so ...

 

I finally had my rgb box showing up !!

my menu is great now ...

the previsualisation of the saber color works

(except that the bow can be black but the saber won't ....i m sure you know why )

 

(i hate coding ui too...)

i ll release it soon ...

i also put 3 boxes near on the right of the sliding bar so you can directly change the value (or just see the value).

 

EDIT and thx for the misc section in your must be sticky post !

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...