Smite Indexdebug, tidy up dev mode

This commit is contained in:
alzeih
2010-07-26 21:43:26 +12:00
parent 30241ddccc
commit d9a423b596
6 changed files with 15 additions and 58 deletions

View File

@@ -25,7 +25,6 @@ namespace OpenRA.GameRules
public bool ShowGameTimer = true;
public bool DeveloperMode = false;
public bool UnitDebug = false;
public bool IndexDebug = false;
// Window settings
public WindowMode WindowMode = WindowMode.PseudoFullscreen;

View File

@@ -120,12 +120,6 @@ namespace OpenRA.Graphics
Game.Renderer.Device.DisableScissor();
if (Game.Settings.IndexDebug)
{
bounds.Offset((int)Game.viewport.Location.X, (int)Game.viewport.Location.Y);
DrawBins(bounds);
}
Game.Renderer.LineRenderer.Flush();
}

View File

@@ -49,55 +49,41 @@ namespace OpenRA.Traits
case "DevFastCharge":
{
FastCharge ^= true;
IssueNotification(FastCharge);
break;
}
case "DevFastBuild":
{
FastBuild ^= true;
IssueNotification(FastBuild);
break;
}
case "DevGiveCash":
{
self.traits.Get<PlayerResources>().GiveCash(Info.Cash);
IssueNotification(true);
break;
}
case "DevShroud":
{
DisableShroud ^= true;
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
IssueNotification(DisableShroud);
if (self.World.LocalPlayer == self.Owner)
{
DisableShroud ^= true;
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
}
break;
}
case "DevPathDebug":
{
PathDebug ^= true;
IssueNotification(PathDebug);
break;
}
case "DevIndexDebug":
{
Game.Settings.IndexDebug ^= true;
IssueNotification(Game.Settings.IndexDebug);
if (self.World.LocalPlayer == self.Owner)
PathDebug ^= true;
break;
}
case "DevUnitDebug":
{
Game.Settings.UnitDebug ^= true;
IssueNotification(Game.Settings.UnitDebug);
if (self.World.LocalPlayer == self.Owner)
Game.Settings.UnitDebug ^= true;
break;
}
}
}
void IssueNotification(bool enabled)
{
if (enabled)
Game.IssueOrder(Order.Chat("I used a devmode option"));
}
}
}

View File

@@ -64,14 +64,6 @@ namespace OpenRA.Widgets.Delegates
return true;
};
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHECKBOX_INDEXDEBUG").Checked =
() => Game.Settings.IndexDebug;
devmodeBG.GetWidget("SETTINGS_CHECKBOX_INDEXDEBUG").OnMouseDown = mi =>
{
Game.IssueOrder(new Order("DevIndexDebug", Game.world.LocalPlayer.PlayerActor));
return true;
};
devmodeBG.GetWidget<ButtonWidget>("SETTINGS_GIVE_CASH").OnMouseUp = mi =>
{
Game.IssueOrder(new Order("DevGiveCash", Game.world.LocalPlayer.PlayerActor));

View File

@@ -236,31 +236,24 @@ Container@ROOT:
Width:PARENT_RIGHT - 30
Height:20
Text:Show Unit Paths
Checkbox@SETTINGS_CHECKBOX_INDEXDEBUG:
Id:SETTINGS_CHECKBOX_INDEXDEBUG
X:30
Y:140
Width:PARENT_RIGHT - 30
Height:20
Text:Show Spatial Index Debug
Button@SETTINGS_GIVE_CASH
Id:SETTINGS_GIVE_CASH
X:30
Y:170
Y:140
Width:200
Height:20
Text: Give Cash
Checkbox@SETTINGS_BUILD_SPEED
Id:SETTINGS_BUILD_SPEED
X:30
Y:200
Y:170
Width:PARENT_RIGHT - 30
Height:20
Text:Instant Build Speed
Checkbox@SETTINGS_CHARGE_TIME
Id:SETTINGS_CHARGE_TIME
X:30
Y:230
Y:200
Width:PARENT_RIGHT - 30
Height:20
Text:Instant Charge Time (Special Powers)

View File

@@ -245,31 +245,24 @@ Container@ROOT:
Width:PARENT_RIGHT - 30
Height:20
Text:Show Unit Paths
Checkbox@SETTINGS_CHECKBOX_INDEXDEBUG:
Id:SETTINGS_CHECKBOX_INDEXDEBUG
X:30
Y:140
Width:PARENT_RIGHT - 30
Height:20
Text:Show Spatial Index Debug
Button@SETTINGS_GIVE_CASH
Id:SETTINGS_GIVE_CASH
X:30
Y:170
Y:140
Width:200
Height:20
Text: Give Cash
Checkbox@SETTINGS_BUILD_SPEED
Id:SETTINGS_BUILD_SPEED
X:30
Y:200
Y:170
Width:PARENT_RIGHT - 30
Height:20
Text:Instant Build Speed
Checkbox@SETTINGS_CHARGE_TIME
Id:SETTINGS_CHARGE_TIME
X:30
Y:230
Y:200
Width:PARENT_RIGHT - 30
Height:20
Text:Instant Charge Time (Special Powers)