Skip to content

Commit

Permalink
Fix style on settings tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpatrick.guerrero@gmail.com authored and Zeno- committed Jan 18, 2015
1 parent e80a044 commit 7b17b90
Showing 1 changed file with 31 additions and 30 deletions.
61 changes: 31 additions & 30 deletions builtin/mainmenu/tab_settings.lua
Expand Up @@ -128,35 +128,35 @@ local function formspec(tabview, name, tabdata)
end
end

local filters = {
{"No Filter,Bilinear Filter,Trilinear Filter"},
{"", "bilinear_filter", "trilinear_filter"},
}

local mipmap = {
{"No Mipmap,Mipmap,Mipmap + Aniso. Filter"},
{"", "mip_map", "anisotropic_filter"},
}

local function getFilterSettingIndex()
if (core.setting_get(filters[2][3]) == "true") then
return 3
end
if (core.setting_get(filters[2][3]) == "false" and core.setting_get(filters[2][2]) == "true") then
return 2
end
return 1
end

local function getMipmapSettingIndex()
if (core.setting_get(mipmap[2][3]) == "true") then
return 3
end
if (core.setting_get(mipmap[2][3]) == "false" and core.setting_get(mipmap[2][2]) == "true") then
return 2
end
return 1
end
local filters = {
{"No Filter,Bilinear Filter,Trilinear Filter"},
{"", "bilinear_filter", "trilinear_filter"},
}

local mipmap = {
{"No Mipmap,Mipmap,Mipmap + Aniso. Filter"},
{"", "mip_map", "anisotropic_filter"},
}

local function getFilterSettingIndex()
if (core.setting_get(filters[2][3]) == "true") then
return 3
end
if (core.setting_get(filters[2][3]) == "false" and core.setting_get(filters[2][2]) == "true") then
return 2
end
return 1
end

local function getMipmapSettingIndex()
if (core.setting_get(mipmap[2][3]) == "true") then
return 3
end
if (core.setting_get(mipmap[2][3]) == "false" and core.setting_get(mipmap[2][2]) == "true") then
return 2
end
return 1
end

local tab_string =
"box[0,0;3.5,3.9;#999999]" ..
Expand Down Expand Up @@ -241,7 +241,8 @@ end
"textlist[8.33,2.2;4,1;;#888888" .. fgettext("Waving Water") .. ";0;true]" ..
"textlist[8.33,2.7;4,1;;#888888" .. fgettext("Waving Leaves") .. ";0;true]" ..
"textlist[8.33,3.2;4,1;;#888888" .. fgettext("Waving Plants") .. ";0;true]"
end
end

return tab_string
end

Expand Down

0 comments on commit 7b17b90

Please sign in to comment.