Jump to content

Home

forceMasteryLevels, GUI


Subject452

Recommended Posts

I've implented a new force mastery level, it works like it's supposed 2 but the only thing that needs to be added is the selectable name in the ui/cgame side, right now there is no name for it but u can select it.

 

In the menu files u can see that the forcemastery levels are drawn from UI_FORCE_RANK (ownerdraw) so i searched the code for that ui/cgame/game but i can find no direct function where u can add your description name for the newforcemasterylevel, so if i want to name my new force "Jedi Bob" where would i do that.

 

Do not get me wrong the code works i just want to know where i can enter my for selectable name. Anybody who knows this?

Link to comment
Share on other sites

i ve worked a little with owner draw (for my mod ..)

and in ui.dll

 

there is a function in main.c

static void UI_OwnerDraw

 

it s a big switch....and it launchs

the diferent functions....

 

so line 2639 (well i added a few lines so .....)

case UI_FORCE_Rank:
     UI_DrawForceMastery(&rect, scale, color, textStyle, uiForceRank, 0, MAX_FORCE_RANK, iMenuFont);
     break;

 

so you should work with this function UI_DrawForceMastery

 

wich is line 1170 in ui main.c

 

hope that helps ....

Link to comment
Share on other sites

well it is this function that is called when the JEDI / PADAWAN ... are drawed ...

 

it may be a hint it is the function

UI_DrawForceMastery

wich draws the JEDI/....and it s this one which should be able to draw Jedi BOB

 

so

some of the parameters are :

uiForceRank, 0, MAX_FORCE_RANK, iMenuFont

 

so the variable is uiforcerank (you should add your's into it)

from 0 to MAX_FORCE_RANK and it's displayed in the box rect

(defined by the .menu)

with the font iMenuFont ....

 

so you must trace

uiforceRank..

 

btw no offense taken ...

(i m still not sure it s going to help you lol but i m trying....)

:)

Link to comment
Share on other sites

I already knew that mon ami, the thing is that nowhere in the source code there is something defined like this mastert7 = jedi master, mastery6 = jedi knight, the mastery is just passed to the ui as uiforcerank/ui_max_force_rank, but not defined.

 

Blehhhhhhhhhhhhhh, i hate rewriting functions.....

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...