sacr1ficez Posted April 2, 2019 Posted April 2, 2019 Hey. How can i switch to other column after adding rows? After adding teams, it adds player names, but i want player names be under "Name" column, not in "Team" column. local scoreBoardGridList = guiCreateGridList(0, 0.0450, 1.30, 0.98, true, scoreBoard) local scoreBoardColumn = {} scoreBoardColumn[1] = guiGridListAddColumn(scoreBoardGridList, "Team", 0.16) local teams = getElementsByType("team") for k, v in pairs(teams) do local r, g, b = getTeamColor(v) local row = guiGridListAddRow(scoreBoardGridList, getTeamName(v)) guiGridListSetItemColor(scoreBoardGridList, row, scoreBoardColumn[1], r, g, b) end scoreBoardColumn[2] = guiGridListAddColumn(scoreBoardGridList, "Name", 0.16) local players = getElementsByType("player") for k, v in pairs(players) do local row = guiGridListAddRow(scoreBoardGridList, getPlayerName(v)) end
Moderators IIYAMA Posted April 3, 2019 Moderators Posted April 3, 2019 (edited) guiGridListAddRow(scoreBoardGridList, getTeamName(team), getPlayerName(v)) It is not very flexible, but you should consider each row an item with mutiple properties. If the two columns aren't related, then you need two gridlists. @majqq Edited April 3, 2019 by IIYAMA 1
sacr1ficez Posted April 3, 2019 Author Posted April 3, 2019 6 hours ago, IIYAMA said: guiGridListAddRow(scoreBoardGridList, getTeamName(team), getPlayerName(v)) It is not very flexible, but you should consider each row an item with mutiple properties. If the two columns aren't related, then you need two gridlists. @majqq Is there anyway to hide scrollbar which creates automatically? 1
Moderators IIYAMA Posted April 3, 2019 Moderators Posted April 3, 2019 1 hour ago, majqq said: Is there anyway to hide scrollbar which creates automatically? Maybe: https://wiki.multitheftauto.com/wiki/GuiSetProperty http://static.cegui.org.uk/static/WindowsLookProperties.html 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now