Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

New pull request: added recent projects system, more bugfixes, added UTFonts.win #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ TO-DO
====================
* Text animation
* A Preview for in-battle texts
* Version Control and backup
* A DIFF viewer for versioned files
* Speeding up file loading
* Loading screen
* Displaying recent projects
8 changes: 6 additions & 2 deletions TranslaTale.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TranslaTale", "TranslaTale\TranslaTale.vbproj", "{93ACB8ED-B285-432B-BF75-D78091D88D07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Debug|Any CPU.ActiveCfg = Debug|x86
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Debug|x86.ActiveCfg = Debug|x86
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Debug|x86.Build.0 = Debug|x86
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Release|Any CPU.ActiveCfg = Release|x86
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Release|x86.ActiveCfg = Release|x86
{93ACB8ED-B285-432B-BF75-D78091D88D07}.Release|x86.Build.0 = Release|x86
EndGlobalSection
Expand Down
14 changes: 7 additions & 7 deletions TranslaTale/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Imports System.Runtime.InteropServices

' Revisar los valores de los atributos del ensamblado

<Assembly: AssemblyTitle("TranslaTale")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyTitle("TranslaTale")>
<Assembly: AssemblyDescription("An Undertale translation helper!")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("TranslaTale")>
<Assembly: AssemblyCopyright("Copyright © 2015 Alex WaveDiver")>
<Assembly: AssemblyProduct("TranslaTale")>
<Assembly: AssemblyCopyright("Copyright © 2016 Alex WaveDiver, Carlo Refice")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>

'El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM
<Assembly: Guid("c6619607-cf6a-4450-8252-b2a28ad605b8")>
<Assembly: Guid("c6619607-cf6a-4450-8252-b2a28ad605b8")>

' La información de versión de un ensamblado consta de los cuatro valores siguientes:
'
Expand All @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' mediante el asterisco ('*'), como se muestra a continuación:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("0.8.0.0")>
<Assembly: AssemblyFileVersion("0.8.0.0")>
<Assembly: AssemblyVersion("0.9.0.0")>
<Assembly: AssemblyFileVersion("0.9.0.0")>
54 changes: 27 additions & 27 deletions TranslaTale/My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,55 +121,55 @@
<data name="ico_play" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\play_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="img1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_filter_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-filter-green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico_save.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="migosp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\migosp.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\5-search-icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico_save.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_up" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="gmpath" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gmpath.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="migosp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\migosp.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="play_gm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\play-gm.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_step" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-step.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_filter_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-filter-red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="fonts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fonts.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="about2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\about2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="img1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_filter_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-filter-green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ico_filter_red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-filter-red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="WinPack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinPack.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\splash.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="gmpath" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\gmpath.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="play_gm" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\play-gm.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ico_step" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ico-step.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WinExtract" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinExtract.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="WinPack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WinPack.exe;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<data name="about2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\about2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
14 changes: 13 additions & 1 deletion TranslaTale/My Project/Settings.Designer.vb

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

3 changes: 3 additions & 0 deletions TranslaTale/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
<Setting Name="fontsheetPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="RecentProjects" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;RecentProjects&gt;&lt;/RecentProjects&gt;</Value>
</Setting>
</Settings>
</SettingsFile>
68 changes: 29 additions & 39 deletions TranslaTale/ProjectManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,57 @@ Public Module ProjectManager
Public CurrentProject As String

Public Sub Write(ByVal filePath As String, ByVal name As String, ByVal cleanScriptPath As String,
ByVal translationPath As String, ByVal imagesPath As String, ByVal fontPath As String,
ByVal translationPath As String, ByVal imagesPath As String,
ByVal cleanGamePath As String, ByVal translatedGamePath As String)

Dim writer As XmlTextWriter = New XmlTextWriter(filePath, System.Text.Encoding.UTF8)
writer.Formatting = Formatting.Indented
writer.WriteStartDocument(True)
writer.WriteStartElement("projectSettings")
writer.WriteElementString("name", name)
writer.WriteElementString("cleanScriptPath", cleanScriptPath)
writer.WriteElementString("translationPath", translationPath)
writer.WriteElementString("imagesPath", imagesPath)
writer.WriteElementString("fontsPath", fontPath)
writer.WriteElementString("cleanGamePath", cleanGamePath)
writer.WriteElementString("translatedGamePath", translatedGamePath)
writer.WriteStartElement("Settings")
writer.WriteElementString("Name", name)
writer.WriteElementString("CleanScriptPath", cleanScriptPath)
writer.WriteElementString("TranslationPath", translationPath)
writer.WriteElementString("ImagesPath", imagesPath)
writer.WriteElementString("CleanGamePath", cleanGamePath)
writer.WriteElementString("TranslatedGamePath", translatedGamePath)
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Close()
End Sub

Public Function GetOutputDirectory() As String
Public Function GetName() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("translatedGamePath")(0).InnerXml
Return doc.GetElementsByTagName("Name")(0).InnerXml
End Function

Public Sub Read(ByRef name As String, ByRef cleanScriptPath As String, ByRef translationPath As String)

Public Function GetCleanScript() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("CleanScriptPath")(0).InnerXml
End Function

name = doc.GetElementsByTagName("name")(0).InnerXml
cleanScriptPath = doc.GetElementsByTagName("cleanScriptPath")(0).InnerXml
translationPath = doc.GetElementsByTagName("translationPath")(0).InnerXml
End Sub

Public Sub Read(ByRef translationPath As String, ByRef imagesPath As String,
ByRef fontsPath As String, ByRef cleanGamePath As String, ByRef translatedGamePath As String)
Public Function GetTranslatedScript() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("TranslationPath")(0).InnerXml
End Function

translationPath = doc.GetElementsByTagName("translationPath")(0).InnerXml
imagesPath = doc.GetElementsByTagName("imagesPath")(0).InnerXml
fontsPath = doc.GetElementsByTagName("fontsPath")(0).InnerXml
cleanGamePath = doc.GetElementsByTagName("cleanGamePath")(0).InnerXml
translatedGamePath = doc.GetElementsByTagName("translatedGamePath")(0).InnerXml

End Sub

Public Sub Read(ByRef name As String, ByRef cleanScriptPath As String, ByRef translationPath As String,
ByRef imagesPath As String, ByRef fontsPath As String, ByRef cleanGamePath As String,
ByRef translatedGamePath As String)
Public Function GetImagesDirectory() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("ImagesPath")(0).InnerXml
End Function

Public Function GetInputDirectory() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("CleanGamePath")(0).InnerXml
End Function

name = doc.GetElementsByTagName("name")(0).InnerXml
cleanScriptPath = doc.GetElementsByTagName("cleanScriptPath")(0).InnerXml
translationPath = doc.GetElementsByTagName("translationPath")(0).InnerXml
imagesPath = doc.GetElementsByTagName("imagesPath")(0).InnerXml
fontsPath = doc.GetElementsByTagName("fontsPath")(0).InnerXml
cleanGamePath = doc.GetElementsByTagName("cleanGamePath")(0).InnerXml
translatedGamePath = doc.GetElementsByTagName("translatedGamePath")(0).InnerXml
End Sub
Public Function GetOutputDirectory() As String
Dim doc As New XmlDocument()
doc.Load(CurrentProject)
Return doc.GetElementsByTagName("TranslatedGamePath")(0).InnerXml
End Function
End Module
Binary file added TranslaTale/Resources/UTFonts.win
Binary file not shown.
Binary file modified TranslaTale/Resources/splash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 39 additions & 5 deletions TranslaTale/funcs.vb → TranslaTale/SettingsManager.vb
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
Imports System.Xml
Imports System.IO

Module funcs
Function getBookmarks()
Module SettingsManager

Function GetBookmarks()
Dim xmlBookmarks As String = My.Settings.Bookmarks
Dim xml As New XmlDocument()
xml.LoadXml(xmlBookmarks)
Dim nodelist As XmlNodeList = xml.SelectNodes("//Bookmarks/Bookmark")
Return nodelist
End Function

Function saveBookmark(ByVal page As Integer, ByVal tag As String)
Function GetRecentProjects()
Dim xmlProjects As String = My.Settings.RecentProjects
Dim xml As New XmlDocument()
xml.LoadXml(xmlProjects)
Dim nodelist As XmlNodeList = xml.SelectNodes("//RecentProjects/Project")
Return nodelist
End Function

Function SaveBookmark(ByVal page As Integer, ByVal tag As String)
Dim xmlBookmarks As String = My.Settings.Bookmarks
Dim xml As XmlDocument = New XmlDocument()
xml.LoadXml(xmlBookmarks)
Expand All @@ -27,7 +36,32 @@ Module funcs
Return True
End Function

Function getSingleBookmark(ByVal index As String)
Function SaveRecentProject(ByVal name As String, ByVal path As String)
Dim oldProjects As XmlNodeList = GetRecentProjects()

For Each proj As XmlNode In oldProjects
If proj.SelectSingleNode("Name").InnerText = name Then
Return False
End If
Next

Dim xmlProjects As String = My.Settings.RecentProjects
Dim xml As XmlDocument = New XmlDocument()
xml.LoadXml(xmlProjects)

With xml.SelectSingleNode("//RecentProjects").CreateNavigator().AppendChild()
.WriteStartElement("Project")
.WriteElementString("Name", name)
.WriteElementString("Path", path)
.WriteEndElement()
.Close()
End With
My.Settings.RecentProjects = xml.OuterXml
My.Settings.Save()
Return True
End Function

Function GetSingleBookmark(ByVal index As String)
Dim xmlBookmarks As String = My.Settings.Bookmarks
Dim xml As XmlDocument = New XmlDocument()
xml.LoadXml(xmlBookmarks)
Expand All @@ -41,7 +75,7 @@ Module funcs
End If
End Function

Function deleteBookmark(ByVal index As String)
Function DeleteBookmark(ByVal index As String)
Dim xmlBookmarks As String = My.Settings.Bookmarks
Dim xml As XmlDocument = New XmlDocument()
xml.LoadXml(xmlBookmarks)
Expand Down
Loading