Last active
August 29, 2015 14:13
-
-
Save sapier/caeb84741dcc7314fb6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local filters = { | |
{"No Filter", ""}, | |
{"Bilinear Filter", "bilinear_filter"}, | |
{"Trilinear Filter", "trilinear_filter"}, | |
} | |
<snip> | |
function getFilterSettingIndex() | |
for i in ipairs(filters) do | |
print("I==" .. i) | |
if i > 1 then -- no filter is default | |
print("checking for: " .. filters[i][2]) | |
if core.setting_getbool(filters[i][2]) then | |
print(" returning index: " .. i) | |
return i | |
end | |
end | |
end | |
print("no setting found, defaulting to 1") | |
return 1 | |
end | |
<snip> | |
tab_string = tab_string .. | |
"dropdown[3.86,0.2;3.75;dd_filters;" .. filters[1][1] .. "," .. filters[2][1] .. "," .. filters[3][1] | |
.. ";" .. getFilterSettingIndex() .. "]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment