init offset = -1 default persistent.seenWarning = [] default persistent.languaged_up = None init python: from math import ceil notice = _("NOTICE: Please keep in mind this is a fan translation, and as such it may not be completely accurate to the original intent of any written lines.") languages = [ {'image': 'gui/flag/USofA.png', 'name': 'English', 'value': 'en' }, {'image': 'gui/flag/Mexico.png', 'name': 'Español', 'value': 'es'}, {'image': 'gui/flag/Rus.png', 'name': 'Русский', 'value': 'ru'}, {'image': 'gui/flag/Poland.png', 'name': 'Polski', 'value': 'pl'}, {'image': 'gui/flag/Italy.png', 'name': 'Italiano', 'value': 'it'}, {'image': 'gui/flag/Brazil.png', 'name': 'Português (BR)', 'value': 'pt_br'}, {'image': 'gui/flag/Thai.png', 'name': 'ภาษาไทย', 'value': 'th'} ] #This was done so it would work with whatever amount of languages you wanted, I tried it with up to 200 and it worked nicely. maxItems = len(languages) maxRows = ceil(maxItems/4) if maxItems > 4: maxItems = 4*maxRows init: transform renpysdumb: # Needed to scale down the imagebuttons. zoom 0.5 transform icon: #For the preferences screen truecenter zoom 0.1 transform glowie(img): img easein_cubic 0.30 matrixcolor TintMatrix(Color((255, 255, 255))) transform darkie(img): img easeout_cubic 0.30 matrixcolor TintMatrix(Color((255/2, 255/2, 255/2))) screen lang_sel(): tag menu frame: background Transform(gui.main_menu_background, matrixcolor=TintMatrix('#222')) padding (120, 40) vbox: style_prefix "navigation" vbox: label _("Choose Your Language") text_size 80 add Null(0, 40) vpgrid: if maxItems <= 4: cols maxItems rows 1 else: cols 4 rows maxRows #spacing 30 draggable True mousewheel True if maxRows > 3: scrollbars "vertical" for i in range(maxItems): fixed: xsize 400 ysize 300 vbox: if i