Backed out changeset: 9ed36a2c6ab2

Making stuff unintuitive is not a "fix".
floating-point
Bernhard Bonigl 2012-04-13 19:18:39 +02:00
parent 71dd5fc64d
commit f5d88c0da5
2 changed files with 14 additions and 14 deletions

View File

@ -108,7 +108,7 @@ func Hide()
}
}
func AddContentMenu(object container, int pos, bool is_crew)
func AddContentMenu(object container, int pos, bool isCrew)
{
var menu = CreateObject(GUI_CircleMenu, 0, 0, GetOwner());
@ -118,9 +118,9 @@ func AddContentMenu(object container, int pos, bool is_crew)
menu->SetDragDropMenu(true);
PutContentsIntoMenu(menu, container);
circ_menus[pos] = {Object = container, Menu = menu, IsCrew = is_crew};
circ_menus[pos] = {Object = container, Menu = menu, IsCrew = isCrew};
if (is_crew)
if(isCrew)
crew_count++;
else
container_count++;
@ -515,22 +515,22 @@ private func GetNextMenu(int index, bool alt)
if (last <= 0)
return nil;
if (!alt)
if(alt)
{
if (index < crew_count-1)
if(index < crew_count-1)
index++;
else if (index == crew_count-1)
else if(index == crew_count-1)
index = last;
else if (index == crew_count)
else if(index == crew_count)
index = 0;
else
index--;
}
else
{
if (index == 0)
if(index == 0)
index = crew_count;
else if (index < crew_count)
else if(index < crew_count)
index--;
else
index++;

View File

@ -53,7 +53,7 @@ private func GetItemPosition(int n, int total)
// Packing 7 or less circles.
if (total <= 7)
{
if (n == 1)
if (n == 7)
return [0, 0];
else
{
@ -66,9 +66,9 @@ private func GetItemPosition(int n, int total)
// Packing 19 or less circles.
if (total <= 19)
{
if (n == 1)
if (n == 7)
return [0, 0];
else if (n <= 7)
else if (n < 7)
{
var x = -Cos(60 * (n+1), 2 * MENU_Radius / 5);
var y = -Sin(60 * (n+1), 2 * MENU_Radius / 5);
@ -85,9 +85,9 @@ private func GetItemPosition(int n, int total)
// Packing 37 or less circles.
if (total <= 37)
{
if (n == 1)
if (n == 7)
return [0, 0];
else if (n <= 7)
else if (n < 7)
{
var x = -Cos(60 * (n+1), 2 * MENU_Radius / 7);
var y = -Sin(60 * (n+1), 2 * MENU_Radius / 7);