Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Editor Template info preview #2574

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Editor/AGS.Editor/GUI/GUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class GUIController : IGUIController
public const string FILE_MENU_ID = "fileToolStripMenuItem";
public const string HELP_MENU_ID = "HelpMenu";
private const string CONTROL_ID_SPLIT = "^!^";
private const string TEMPLATE_INTRO_FILE = "template.txt";
private const string ROOM_TEMPLATE_ID_FILE = "rtemplate.dat";
private const int ROOM_TEMPLATE_ID_FILE_SIGNATURE = 0x74673812;
private const string WINDOW_CONFIG_FILENAME = "WindowConfig.json";
Expand Down Expand Up @@ -1153,14 +1152,6 @@ private bool CreateNewGame(string newGamePath, string newFileName, string newGam

Factory.AGSEditor.Settings.MessageBoxOnCompile = oldMessageBoxSetting;
}
if (File.Exists(TEMPLATE_INTRO_FILE))
{
StreamReader sr = new StreamReader(TEMPLATE_INTRO_FILE);
string introText = sr.ReadToEnd();
sr.Close();

Factory.GUIController.ShowMessage(introText, MessageBoxIcon.Information);
}
createdSuccessfully = true;
}
}
Expand Down
51 changes: 49 additions & 2 deletions Editor/AGS.Editor/GUI/StartNewGameWizardPage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Editor/AGS.Editor/GUI/StartNewGameWizardPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,14 @@ public override void PageShown()
{
lstTemplates.Focus();
}

private void lstTemplates_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
{
if (e.IsSelected && e.ItemIndex >= 0)
tbDescription.Text = string.IsNullOrWhiteSpace(_templates[e.ItemIndex].Description)
? "No description available." : _templates[e.ItemIndex].Description;
else
tbDescription.Text = "";
}
}
}
4 changes: 2 additions & 2 deletions Editor/AGS.Editor/GUI/StartNewGameWizardPage.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Loading