Skip to content

GUI Journal and Character Screen

mashedtatersmashedtaters Member Posts: 2,266
Hey everyone, long time no see. I got back into the infinity engine games recently and wanted to try my hand at adjusting the GUI. I've done fairly good at it so far by playing around with F11 and the UI.MENU file.

I have a question, though, where I'm a bit stuck. Maybe some of the awesome experts out there could give me a hand.

I want to add the character's Large portrait to the Journal Menu. I'm currently talking about IWDEE, not BG1/2EE with the sliding menu. I have so far been able to accomplish this by copying the BUTTON_2_2 code from the record screen section to the journal section. Looks like this:
button
	{
		area -136 650 232 48
		text "JOURNAL_LABEL"
		text style "button"
		bam GUIBUTMT
		glow lua "journalMode == const.JOURNAL_MODE_JOURNAL"
		sequenceonce "getRandomButtonSequence('GUIBUTMT')"
		action "journalMode = const.JOURNAL_MODE_JOURNAL"
	}
	button
	{
		name		"BUTTON_2_2"
		area		356 -8 210 330
		--text		lua "characters[currentID].portrait"
		text align	center center
		text point	10
		text color	B
		bitmap		lua "characters[currentID].portrait"
		action
		"
			Infinity_Log(dump(characters, 0))
		"
	}
	button
	{
		area 82 116 232 46
		text "QUESTS_LABEL"
		text style "button"
		bam GUIBUTMT
		glow lua "journalMode == const.JOURNAL_MODE_QUESTS"
		sequenceonce "getRandomButtonSequence('GUIBUTMT')"
		action "journalMode = const.JOURNAL_MODE_QUESTS"
	}
	button
	{
		area -150 116 232 46
		text lua "Infinity_FetchString(34593)"
		text style "button"
		bam GUIBUTMT
		glow lua "journalMode == const.JOURNAL_MODE_DONEQUESTS"
		sequenceonce "getRandomButtonSequence('GUIBUTMT')"
		action "journalMode = const.JOURNAL_MODE_DONEQUESTS"

And like magic, the character's large portrait appears on the journal screen! Yay!

However, there is a bit of a quirk that I don't like, and am not sure how to fix. When I left click on a different character in-game on the right hand side bar, it doesn't change the portrait. I have to navigate to one of the other pages, like the record or inventory screens, and then back to the journal screen in order for the image to update.

I am not very familiar with coding in general, most of my experience is copying and pasting other people's code around, and navigating around other people's code. Making something new happen isn't what I'm used to doing.

I'd appreciate any advice from the guru's here. Thanks.

Comments

Sign In or Register to comment.