Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
KeyboardHelpDialog.cs
浏览该文件的文档.
1using System.Xml.Linq;
2using Engine.Input;
3
4namespace Game {
5 public class KeyboardHelpDialog : Dialog {
7
9
11 XElement node = ContentManager.Get<XElement>("Dialogs/KeyboardHelpDialog");
12 LoadContents(this, node);
13 m_okButton = Children.Find<ButtonWidget>("OkButton");
14 m_helpButton = Children.Find<ButtonWidget>("HelpButton");
15 }
16
17 public override void Update() {
18 m_helpButton.IsVisible = !(ScreensManager.CurrentScreen is HelpScreen);
19 if (m_okButton.IsClicked
20 || Input.Cancel
21 || Input.IsKeyDownOnce(Key.H)) {
23 }
24 if (m_helpButton.IsClicked) {
27 }
28 }
29 }
30}
readonly WidgetsList Children
static object Get(Type type, string name)
static void HideDialog(Dialog dialog)
static void SwitchScreen(string name, params object[] parameters)
virtual void LoadContents(object eventsTarget, XElement node)