Added Some Debug Code trying to fix problem

This commit is contained in:
Cooldude2606
2017-08-20 20:48:05 +01:00
parent b39daed3b1
commit 49cb1c8f44

View File

@@ -51,12 +51,14 @@ function draw_frame.center(player,element)
local tab_bar = tab_bar_scroll.add{type='flow',direction='horizontal',name='tab_bar'}
local tab = frame.add{type = "scroll-pane", name= "tab", vertical_scroll_policy="auto", horizontal_scroll_policy="never"}
for n,t in pairs(frame_data.tabs) do
game.print(table.to_string(t))
local temp_restriction = nil
if type(t.restriction) == 'number' then temp_restriction = t.restriction end
local restriction = temp_restriction or string_to_rank(t.restriction).power or 0
game.print(temp_restriction)
local restriction = temp_restriction or string_to_rank(t.restriction).power
if restriction >= get_rank(player).power then ExpGui.add_input.draw_button(tab_bar,t.name) end
end
draw_frame.tab(player,tab_bar[frame_data.tabs[1]].name)
draw_frame.tab(player,tab_bar[frame_data.tabs[1].name])
ExpGui.add_input.draw_button(tab_bar,'close_center')
tab.style.minimal_height = 300
tab.style.maximal_height = 300