本文整理汇总了C#中IResourceManager.GetFont方法的典型用法代码示例。如果您正苦于以下问题:C# IResourceManager.GetFont方法的具体用法?C# IResourceManager.GetFont怎么用?C# IResourceManager.GetFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IResourceManager
的用法示例。
在下文中一共展示了IResourceManager.GetFont方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HealthScannerWindow
public HealthScannerWindow(Entity assignedEnt, Vector2D mousePos, UserInterfaceManager uiMgr,
IResourceManager resourceManager)
{
_resourceManager = resourceManager;
assigned = assignedEnt;
_uiMgr = uiMgr;
_overallHealth = new TextSprite("hpscan" + assignedEnt.Uid.ToString(), "",
_resourceManager.GetFont("CALIBRI"));
_overallHealth.Color = Color.ForestGreen;
_background = _resourceManager.GetSprite("healthscan_bg");
_head = _resourceManager.GetSprite("healthscan_head");
_chest = _resourceManager.GetSprite("healthscan_chest");
_arml = _resourceManager.GetSprite("healthscan_arml");
_armr = _resourceManager.GetSprite("healthscan_armr");
_groin = _resourceManager.GetSprite("healthscan_groin");
_legl = _resourceManager.GetSprite("healthscan_legl");
_legr = _resourceManager.GetSprite("healthscan_legr");
Position = new Point((int) mousePos.X, (int) mousePos.Y);
Setup();
Update(0);
}
示例2: BlueprintButton
public BlueprintButton(string c1, string c1N, string c2, string c2N, string res, string resname,
IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Compo1 = c1;
Compo1Name = c1N;
Compo2 = c2;
Compo2Name = c2N;
Result = res;
ResultName = resname;
_icon = _resourceManager.GetSprite("blueprint");
Label = new TextSprite("blueprinttext", "", _resourceManager.GetFont("CALIBRI"))
{
Color = Color.GhostWhite,
ShadowColor = Color.DimGray,
ShadowOffset = new Vector2(1, 1),
Shadowed = true
};
Update(0);
}
示例3: BlueprintButton
public BlueprintButton(string c1, string c1N, string c2, string c2N, string res, string resname,
IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Compo1 = c1;
Compo1Name = c1N;
Compo2 = c2;
Compo2Name = c2N;
Result = res;
ResultName = resname;
_icon = _resourceManager.GetSprite("blueprint");
Label = new TextSprite("blueprinttext", "", _resourceManager.GetFont("CALIBRI"))
{
Color = new SFML.Graphics.Color(248, 248, 255),
ShadowColor = new SFML.Graphics.Color(105, 105, 105),
ShadowOffset = new Vector2f(1, 1),
Shadowed = true
};
Update(0);
}
示例4: NetworkGrapher
public NetworkGrapher(IResourceManager resourceManager, INetworkManager networkManager)
{
_resourceManager = resourceManager;
_networkManager = networkManager;
_dataPoints = new List<NetworkStatisticsDataPoint>();
_lastDataPointTime = DateTime.Now;
_textSprite = new TextSprite("NetGraphText", "", _resourceManager.GetFont("base_font"));
}
示例5: Label
public Label(string text, string font, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Text = new TextSprite("Label" + text, text, _resourceManager.GetFont(font)) {Color = Color.Black};
Update(0);
}
示例6: StatusEffectButton
public StatusEffectButton(StatusEffect _assigned, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
_buttonSprite = _resourceManager.GetSprite(_assigned.icon);
assignedEffect = _assigned;
Color = Color.White;
timeLeft = new TextSprite("timeleft" + _assigned.uid.ToString() + _assigned.name, "",
_resourceManager.GetFont("CALIBRI"));
timeLeft.Color = Color.White;
timeLeft.ShadowColor = Color.Gray;
timeLeft.ShadowOffset = new Vector2(1, 1);
timeLeft.Shadowed = true;
tooltip = new TextSprite("tooltip" + _assigned.uid.ToString() + _assigned.name, "",
_resourceManager.GetFont("CALIBRI"));
tooltip.Color = Color.Black;
Update(0);
}
示例7: Textbox
public Textbox(int width, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
_textboxLeft = _resourceManager.GetSprite("text_left");
_textboxMain = _resourceManager.GetSprite("text_middle");
_textboxRight = _resourceManager.GetSprite("text_right");
Width = width;
Label = new TextSprite("Textbox", "", _resourceManager.GetFont("CALIBRI")) {Color = Color.Black};
Update(0);
}
示例8: Progress_Bar
public Progress_Bar(Size size, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Text = new TextSprite("ProgressBarText", "", _resourceManager.GetFont("CALIBRI"));
Text.Color = Color.Black;
Text.ShadowColor = Color.DimGray;
Text.ShadowOffset = new Vector2(1, 1);
Text.Shadowed = true;
Size = size;
Update(0);
}
示例9: Progress_Bar
public Progress_Bar(Vector2i size, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Text = new TextSprite("ProgressBarText", "", _resourceManager.GetFont("CALIBRI"));
Text.Color = Color.Black;
Text.ShadowColor = new SFML.Graphics.Color(105, 105, 105);
Text.ShadowOffset = new Vector2f(1, 1);
Text.Shadowed = true;
Size = size;
Update(0);
}
示例10: PlayerActionButton
public PlayerActionButton(IPlayerAction _assigned, IResourceManager resourceManager)
{
UiMgr = IoCManager.Resolve<IUserInterfaceManager>();
_resourceManager = resourceManager;
_buttonSprite = _resourceManager.GetSprite(_assigned.Icon);
assignedAction = _assigned;
Color = Color.White;
timeLeft = new TextSprite("cooldown" + _assigned.Uid.ToString() + _assigned.Name, "",
_resourceManager.GetFont("CALIBRI"));
timeLeft.Color = Color.NavajoWhite;
timeLeft.ShadowColor = Color.Black;
timeLeft.ShadowOffset = new Vector2(1, 1);
timeLeft.Shadowed = true;
tooltip = new TextSprite("tooltipAct" + _assigned.Uid.ToString() + _assigned.Name, "",
_resourceManager.GetFont("CALIBRI"));
tooltip.Color = Color.Black;
Update(0);
}
示例11: Button
public Button(string buttonText, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
_buttonLeft = _resourceManager.GetSprite("button_left");
_buttonMain = _resourceManager.GetSprite("button_middle");
_buttonRight = _resourceManager.GetSprite("button_right");
Label = new TextSprite("ButtonLabel" + buttonText, buttonText, _resourceManager.GetFont("CALIBRI"))
{
Color = Color.Black
};
Update(0);
}
示例12: SpeechBubble
public SpeechBubble(string mobname)
{
_resourceManager = IoCManager.Resolve<IResourceManager>();
_mobName = mobname;
_buildTime = DateTime.Now;
_textSprite = new Text(String.Empty, _resourceManager.GetFont("CALIBRI"));
_textSprite.Color = Color.Black;
// TODO Word wrap!
_textSprite.Position = new Vector2f(5, 3);
_stringBuilder = new StringBuilder();
_bubbleRender = new RenderImage("bubble ",1, 1);
_bubbleSprite = new Sprite(_bubbleRender.Texture);
}
示例13: Scrollbar
public int size = 300; //Graphical length of the bar.
public Scrollbar(bool horizontal, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
Horizontal = horizontal;
if (Horizontal) scrollbarButton = _resourceManager.GetSprite("scrollbutton_h");
else scrollbarButton = _resourceManager.GetSprite("scrollbutton_v");
DEBUG = new TextSprite("DEBUGSLIDER", "Position:", _resourceManager.GetFont("CALIBRI"));
DEBUG.Color = Color.OrangeRed;
DEBUG.ShadowColor = Color.DarkBlue;
DEBUG.Shadowed = true;
// DEBUG.ShadowOffset = new Vector2(1, 1);
Update(0);
}
示例14: JobSelectButton
public JobSelectButton(string text, string spriteName, string description, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
_buttonSprite = _resourceManager.GetSprite("job_button");
_jobSprite = _resourceManager.GetSprite(spriteName);
_descriptionTextSprite = new TextSprite("JobButtonDescLabel" + text, text + ":\n" + description,
_resourceManager.GetFont("CALIBRI"))
{
Color = Color.Black,
ShadowColor = new Color(105, 105, 105),
Shadowed = true,
//ShadowOffset = new Vector2(1, 1)
};
Update(0);
}
示例15: ArmorInfoLabel
public ArmorInfoLabel(DamageType resistance, IResourceManager resourceManager)
{
_resourceManager = resourceManager;
resAssigned = resistance;
text = new TextSprite("StatInfoLabel" + resistance, "", _resourceManager.GetFont("CALIBRI"))
{Color = Color.White};
switch (resistance)
{
case DamageType.Bludgeoning:
icon = resourceManager.GetSprite("res_blunt");
break;
case DamageType.Burn:
icon = resourceManager.GetSprite("res_burn");
break;
case DamageType.Freeze:
icon = resourceManager.GetSprite("res_freeze");
break;
case DamageType.Piercing:
icon = resourceManager.GetSprite("res_pierce");
break;
case DamageType.Shock:
icon = resourceManager.GetSprite("res_shock");
break;
case DamageType.Slashing:
icon = resourceManager.GetSprite("res_slash");
break;
case DamageType.Suffocation:
icon = resourceManager.GetSprite("statusbar_switch");
break;
case DamageType.Toxin:
icon = resourceManager.GetSprite("res_tox");
break;
case DamageType.Untyped:
icon = resourceManager.GetSprite("statusbar_switch");
break;
}
Update(0);
}