本文整理汇总了C#中Text.Update方法的典型用法代码示例。如果您正苦于以下问题:C# Text.Update方法的具体用法?C# Text.Update怎么用?C# Text.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Text
的用法示例。
在下文中一共展示了Text.Update方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Control
public Control(Game game, string text)
{
this.game = game;
textTexture = new Text(game.ClientSize, new Size(0, 0), new Point(0, 0));
textTexture.Update(text);
this.text = text;
}
示例2: SelectComponent
public SelectComponent(Game game, Rectangle bounds, string text, string line2)
: base(game, bounds, text)
{
line = line2;
lineTwo = new Text(Config.ClientSize, new Size(bounds.Width, bounds.Height), new Point(bounds.X, bounds.Y));
lineTwo.Update(line);
OnLoad(null);
baseX = bounds.X;
}
示例3: UserDisplay
public UserDisplay(User u, Point location)
{
this.u = u;
back.Bounds = new Rectangle(location, new Size(back.Bounds.Width, back.Bounds.Height));
front.Bounds = new Rectangle(location.X + 2, location.Y + 2, front.Bounds.Width, front.Bounds.Height);
back.Colour = new Color4(0.6f, 0.6f, 0.6f, 0.9f);
front.Colour = new Color4(0.6f, 0.6f, 0.6f, 0.8f);
Thread t = new Thread(new ParameterizedThreadStart(downloadThread));
wc = new WebClient();
t.IsBackground = true;
t.Start(u.Avatar);
name = new Text(new Size(118, 200), new Point(location.X + 90, location.Y + 2));
name.Shadow = false;
name.Update(u.RealName);
playCount = new Text(new Size(300, 300), new Point(location.X + 90, location.Y + 35));
playCount.Shadow = false;
playCount.textFont = new Font("Myriad Pro", 14);
playCount.Line = ("PC: " + u.Playcount + "\nScore: " + u.TotalScore + "\nLevel: " + u.Level);
b = new Button(Game.game, new Rectangle(playCount.Location, new Size(100, 30)), "PM", delegate(int e)
{
Game.pbox.addTab("pulse|" + u.RealName);
});
b2 = new Button(Game.game, new Rectangle(playCount.Location, new Size(100, 30)), "Spec", delegate(int e)
{
if (!Config.Spectating)
{
if (!u.Name.ToLower().Equals(Account.currentAccount.AccountName.ToLower()))
{
Client.PacketWriter.sendSpectateHook(Game.conn.Bw, u.Name);
Game.pbox.addLine("Spectating " + u.Name + " (if they are online)");
}
else
{
Game.pbox.addLine("You can't spectate yourself");
}
}
else
{
if (!Config.SpectatedUser.Equals(""))
{
Game.pbox.addLine("Canceling spectate on " + Config.SpectatedUser);
}
Client.PacketWriter.sendSpectateCancel(Game.conn.Bw, Config.SpectatedUser);
Config.SpectatedUser = "";
Config.Spectating = false;
}
});
if (u.avatarRect != null)
{
avatar = u.avatarRect;
}
}
示例4: refresh
private void refresh()
{
//todo show some animation during this
transitioning = true;
songNameList.Clear();
SongLibrary.cacheSongInfo(); //prob should make separate method since searching forces cache refresh lol. we are good coders dont worry
foreach (var pair in SongLibrary.songInfos)
{
Text temp = new Text(Config.ClientSize, new Size(550, 35), new Point(0, 0));
/*SizeF temp1 = temp.getStringSize(pair.Value.Artist + " - " + pair.Value.SongName);
temp.TextureSize = new Size((int)temp1.Width, (int)temp1.Height);*/
temp.Update(pair.Value.Artist + " - " + pair.Value.SongName);
temp.Shadow = true;
SelectComponent sc = new SelectComponent(game, new Rectangle(-50, 0, 550, 90), pair.Value.Artist, pair.Value.SongName);
sc.clickEvent += new Action<int, SelectComponent>(sc_clickEvent);
SongPair sp = new SongPair(sc, pair.Value);
songNameList.Add(sp);
sc.index = songNameList.IndexOf(sp);
}
songNameList.Sort(new Comparison<SongPair>(delegate(SongPair f, SongPair j)
{
return -f.Info.SongName.CompareTo(j.Info.SongName);
}));
foreach (SongPair sp in songNameList)
{
sp.select.index = songNameList.IndexOf(sp);
}
}
示例5: CreateOrUpdate
public void CreateOrUpdate(Text txt)
{
if (txt.IsCreated) txt.Update();
else txt.Create();
}