convert silly DoXXX names to just XXX

This commit is contained in:
Chris Forbes
2011-12-13 23:44:40 +13:00
parent ed429a3b30
commit 58f6816d84
4 changed files with 9 additions and 15 deletions

View File

@@ -160,7 +160,7 @@ namespace OpenRA
using( new PerfSample( "tick_time" ) )
{
orderManager.LastTickTime += Settings.Game.Timestep;
Ui.DoTick();
Ui.Tick();
var world = orderManager.world;
if (orderManager.GameStarted)
++Viewport.TicksSinceLastMove;

View File

@@ -126,7 +126,7 @@ namespace OpenRA.Graphics
using( new PerfSample("render_widgets") )
{
Ui.DoDraw();
Ui.Draw();
var cursorName = Ui.RootWidget.GetCursorOuter(Viewport.LastMousePos) ?? "default";
var cursorSequence = CursorProvider.GetCursorSequence(cursorName);
var cursorSprite = cursorSequence.GetSprite((int)cursorFrame);

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
@@ -35,12 +35,12 @@ namespace OpenRA
public void OnKeyInput( KeyInput input )
{
Sync.CheckSyncUnchanged(world, () => Ui.DoHandleKeyPress(input));
Sync.CheckSyncUnchanged(world, () => Ui.HandleKeyPress(input));
}
public void OnMouseInput( MouseInput input )
{
Sync.CheckSyncUnchanged(world, () => Ui.DoHandleInput(input));
Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input));
}
}
}

View File

@@ -52,17 +52,11 @@ namespace OpenRA.Widgets
return Game.modData.WidgetLoader.LoadWidget(args, parent, id);
}
public static void DoTick()
{
RootWidget.TickOuter();
}
public static void Tick() { RootWidget.TickOuter(); }
public static void DoDraw()
{
RootWidget.DrawOuter();
}
public static void Draw() { RootWidget.DrawOuter(); }
public static bool DoHandleInput(MouseInput mi)
public static bool HandleInput(MouseInput mi)
{
var wasMouseOver = MouseOverWidget;
@@ -94,7 +88,7 @@ namespace OpenRA.Widgets
return handled;
}
public static bool DoHandleKeyPress(KeyInput e)
public static bool HandleKeyPress(KeyInput e)
{
if (SelectedWidget != null)
return SelectedWidget.HandleKeyPressOuter(e);