PDA

View Full Version : ui help needed ...


Tchouky
06-05-2002, 01:32 PM
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 !

Subject452
06-05-2002, 01:37 PM
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.

Tchouky
06-05-2002, 01:39 PM
thx i ll try this !

normal
06-05-2002, 01:41 PM
BTW -- I added a "Misc" section to the Resources & Help thread, there is a link to a page with extensive documentation on .menu files. Perhaps that will help? :)

:jawa

Subject452
06-05-2002, 01:48 PM
coooooool, u should really make that thread sticky :)

normal
06-05-2002, 01:49 PM
Originally posted by Subject452
coooooool, u should really make that thread sticky :)
I would if I could.

:jawa

Tchouky
06-05-2002, 02:11 PM
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 .....

Tchouky
06-05-2002, 03:09 PM
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

normal
06-05-2002, 05:31 PM
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 );
}

Tchouky
06-05-2002, 05:45 PM
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 !

normal
06-05-2002, 05:53 PM
No problem!

:D

BTW, when will the next version be ready? I havn't tried your mod out, and would like to. :cool:

:jawa

Tchouky
06-05-2002, 06:15 PM
well my new beta should be released when you 'll read these lines...
i m uploading it to my ftp.

i ll update the sources too in a few minutes ...

tell me what you think of it plz

Tchouky
06-05-2002, 06:21 PM
well my new beta should be released when you 'll read these lines...
i m uploading it to my ftp.

i ll update the sources too in a few minutes ...

tell me what you think of it plz

http://mbalch.free.fr/tck.zip