Jump to content

GUI: strref of the text on a button


Hurricane

Recommended Posts

I am looking at .chu files. A .chu file can define a clickable button in the interface. I am interested in those buttons that have a string displayed on them, e.g. the buttons in the main menu saying "load game" (strref #13729) or "cancel" (strref #13727). My question: Is there a way to find out the strref associated with a button of a given .chu file? The strrefs don't seem to be stored in the .chu file.

 

I don't want to modify anything, I only want to know the respective strrefs.

Link to comment

@Jarno: I don't know the text, though. I can't search the tlk because I don't know what text to search for. I'm only guessing from the shape of the button in the .chu file that there should be text displayed on it, but the .chu file doesn't tell me which string is used.

 

The example strings I mentioned I only found out by looking at buttons in-game. So far I've already been doing what K4thos described. But I want to go through ALL buttons systematically. I can't do that in-game. Instead, I want to go through the .chu files.

 

So maybe I should rephrase:

How are strings assigned to GUI buttons? And where are the respective strrefs stored?

Link to comment

CHU files are using Label structures to define text. Only a few buttons contain an associated label though. And some of them appear to contain placeholder text which is replaced in-game. The remaining labels are most likely hardcoded in the game executable.

Link to comment

Only a few buttons contain an associated label though.

Could you give me an example where this is the case?

 

 

Well, if you just want to see the #'s then this isn't a big deal.

Yes, I just want to see the strrefs. But can I see them without starting the game? Can I somehow go through them systematically, say, with NearInfinity?

Link to comment

Only a few buttons contain an associated label though.

Could you give me an example where this is the case?

Labels are mostly present for checkboxes (which also count as buttons in CHU files). For example, GUIBASE.CHU->Panel 9, 10 or 11. I haven't seen one for regular buttons though. Edit: There are actually a few regular buttons with (placeholder) text in GUISTORE.CHU->Panel 8.

Link to comment

Archived

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

×
×
  • Create New...