if province_name_table[provinceName][3] == 2 then
Debug("Province Name Number of Regions = 2 or 3")
local growth_bar_pX, growth_bar_pY = growth_bar_uic
osition()
if save_X_2 == 0
and save_X_4 == 0
then original_X_2 = growth_bar_pX
Debug("First Province clicked with Number of Regions = 2 or 3")
Debug("growth_bar_pX: "..tostring(growth_bar_pX).." growth_bar_pY: "..tostring(growth_bar_pY))
elseif save_X_4 ~= 0 then
original_X_2 = growth_bar_pX - 70
Debug("First Province clicked with Number of Regions = 4")
Debug("Set original_X_2: "..tostring(original_X_2))
end;
X = original_X_2 + 370
Debug("Set New X: "..tostring(X))
if save_X_2 == 0
and save_X_4 == 0
then save_X_2 = X
Debug("Set New save_X_2: "..tostring(save_X_2))
elseif save_X_2 == 0
and save_X_4 ~= 0
then save_X_2 = original_X_2 + 370
Debug("Set New save_X_2: "..tostring(save_X_2))
end;
growth_bar_uic:MoveTo(save_X_2, growth_bar_pY)
return;
end;
if province_name_table[provinceName][3] == 4 then
Debug("Province Name Number of Regions = 4")
local growth_bar_pX, growth_bar_pY = growth_bar_uic
osition()
if save_X_2 == 0
and save_X_4 == 0
then original_X_4 = growth_bar_pX
Debug("First Province clicked with Number of Regions = 4")
Debug("growth_bar_pX: "..tostring(growth_bar_pX).." growth_bar_pY: "..tostring(growth_bar_pY))
elseif save_X_2 ~= 0
then original_X_4 = growth_bar_pX - 370
Debug("First Province clicked with Number of Regions = 2 or 3");
Debug("Set original_X_4: "..tostring(original_X_4));
end;
X = original_X_4 + 70
if save_X_2 == 0
and save_X_4 == 0
then save_X_4 = X
Debug("Set New save_X_4: "..tostring(save_X_4));
elseif save_X_4 == 0
and save_X_2 ~= 0
then save_X_4 = original_X_4 + 70
Debug("Set New save_X_4: "..tostring(save_X_4));
end;
growth_bar_uic:MoveTo(save_X_4, growth_bar_pY);
end;
growth_bar_uic:SetMoveable(false); -- make sure the toolbar can't be moved by the player
end;