Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nationStat = ufox.datatable.build(rootNode, {
- name = "nationslist",
- pos = {465, 75},
- size = {545, 235},
- })
- nationStat:add_headerFields({
- { name = "flag", width = 20, },
- { name = "nation_name", width = 270, text = "_Nation", },
- { name = "funding", width = 100, text = "_Funding", contentalign = ufo.ALIGN_CR, },
- { name = "happiness", width = 135, text = "_Happiness", contentalign = ufo.ALIGN_CR, },
- })
- local nations_add = ufox.build({
- name = "ui_nations_fill",
- class = "confunc",
- on_click = function (sender, nationID, nationName, monthIDX, nationHappiness, nationHappinessString, nationFunding, nationColor)
- if (monthIDX ~= "0") then
- return
- end
- -- ufo.print(string.format("Got data for nation %s month %s\n", nationID, monthIDX))
- local row = sender:parent():child("nationslist"):add_dataRow({name = nationID}, {
- { name = "flag", source = "nations/" .. nationID, class = "image", keepratio = true, ghost = true, },
- { name = "nation_name", text = nationName, },
- { name = "funding", text = nationFunding, contentalign = ufo.ALIGN_CR, },
- { name = "happiness", text = nationHappinessString, contentalign = ufo.ALIGN_CR, },
- })
- end,
- }, rootNode);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement