Jump to content

modifying display of a table in ui menu


Guest xvnon

Recommended Posts

Guest xvnon

Anyone here familiar with the lua in the ui.menu that would know how to do this?: 

I have a table.. which is the sound option toggles.. the table being:

selectOpt = {
{'ALWAYS_LABEL',0, 58, 0, 0},
{'SELDOM_LABEL',0, 59, 0, 0},
{'NEVER_LABEL',0, 60, 0, 0}
}

I wanted to add an enabled/disabled inside of the list that will make it so the label next to the middle row only appears... something like this:

                             Always  (button)                                                                                              Selections          Always  (button)

Selections          Seldom (button)                   ... as of current it displays like this:              Selections          Seldom (button)  

                             Never    (button)                                                                                               Selections          Never    (button)



I know I have to creature a function to check for the other var[] inside of the table, however things like journalDisplay use different formats from something like this. 

Here is what the list looks like: 

 

Spoiler

	list
	{
		column 
		{ 
			width 85
			label
			{
				area 0 0 -1 -1
				text lua "t(selectOpt[rowNumber][1])"
			}
		}
		column 
		{ 
			width 15
			label
			{
				area		0 0 -1 -1
				bam			ROUNDBUT
				align 		center center
				frame		lua "selectOpt[rowNumber][4]"
			}
		}

		area 10 10 10 10
		rowheight	30
		table		"selectOpt"
		var		selectSel
		hidehighlight
	}

 

So under the two columns I'd have to add an 'enabled "conditional here" ... So it only shows up in the middle section of the table. So does anyone know what would have to be done for that?

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...