def align_menus():
	for menu in MENUS:
		if not MENUS.index(menu):
			continue
		
		if not menu['alignment'] and menu['settings']['position'][1] > 1:
			continue
		
		if not 'position_mod' in menu['settings']:
			menu['settings']['position_mod'] = menu['settings']['position'][:]
		
		if menu['alignment'] == 'botleft':
			menu['settings']['position'][0] = 1
			menu['settings']['position'][1] = WINDOW_SIZE[1]-menu['settings']['size'][1]-1
		
		if menu['alignment']:
			menu['settings']['position'][0] += menu['settings']['position_mod'][0]
			menu['settings']['position'][1] += menu['settings']['position_mod'][1]
			continue
		
		_prev_menu = MENUS[1-MENUS.index(menu)]
		_y_mod = _prev_menu['settings']['position'][1]+_prev_menu['settings']['size'][1]
		
		menu['settings']['position'][1] = _y_mod+1
dataset/ETHPy150Open flags/Reactor-3/menus.py/align_menus/swapped operands of `-`