Josh Engebretson 11 年之前
父节点
当前提交
1e2ef6d502

+ 1 - 1
Data/AtomicEditor/Resources/EditorData/AtomicEditor/editor/ui/activation.tb.txt

@@ -1,7 +1,7 @@
 TBLayout: axis: y, distribution: gravity, position: left
 TBLayout: axis: y, distribution: gravity, position: left
 	TBSeparator: gravity: left right, skin: AESeparator
 	TBSeparator: gravity: left right, skin: AESeparator
 	TBLayout: distribution: gravity
 	TBLayout: distribution: gravity
-		TBTextField: text: "License Key:"
+		TBTextField: text: "Product Key:"
 			font: size:18
 			font: size:18
 		TBLayout: gravity: left right, distribution-position: right bottom
 		TBLayout: gravity: left right, distribution-position: right bottom
 			TBEditField: id: license_key, autofocus: 1
 			TBEditField: id: license_key, autofocus: 1

+ 29 - 1
Source/AtomicEditor/Source/AEPreferences.cpp

@@ -88,6 +88,8 @@ void AEPreferences::Read()
     if (android_sdk_path && android_sdk_path->value.IsString())
     if (android_sdk_path && android_sdk_path->value.IsString())
         androidSDKPath_ = android_sdk_path->value.GetString();
         androidSDKPath_ = android_sdk_path->value.GetString();
 
 
+    UpdateRecentFiles(false);
+
 }
 }
 
 
 void AEPreferences::Write()
 void AEPreferences::Write()
@@ -120,6 +122,31 @@ void AEPreferences::Write()
 
 
 }
 }
 
 
+void AEPreferences::UpdateRecentFiles(bool write)
+{
+    FileSystem* fileSystem = GetSubsystem<FileSystem>();
+    Vector<String> recentProjects;
+
+    for (unsigned i = 0; i < recentProjects_.Size(); i++)
+    {
+        String path = recentProjects_[i];
+
+        if (!fileSystem->FileExists(path))
+            continue;
+
+
+        recentProjects.Push(path);
+
+        if (recentProjects.Size() == 10)
+            break;
+    }
+
+    recentProjects_ = recentProjects;
+
+    if (write)
+        Write();
+}
+
 void AEPreferences::RegisterRecentProject(const String& fullpath)
 void AEPreferences::RegisterRecentProject(const String& fullpath)
 {
 {
     if (recentProjects_.Contains(fullpath))
     if (recentProjects_.Contains(fullpath))
@@ -129,7 +156,8 @@ void AEPreferences::RegisterRecentProject(const String& fullpath)
 
 
     recentProjects_.Insert(0, fullpath);
     recentProjects_.Insert(0, fullpath);
 
 
-    Write();
+
+    UpdateRecentFiles();
 
 
 }
 }
 
 

+ 2 - 0
Source/AtomicEditor/Source/AEPreferences.h

@@ -32,6 +32,8 @@ public:
     void Read();
     void Read();
     void Write();
     void Write();
 
 
+    void UpdateRecentFiles(bool write = true);
+
 private:
 private:
 
 
     void Clear();
     void Clear();

+ 1 - 1
Source/AtomicEditor/Source/UI/Modal/UIAbout.cpp

@@ -33,7 +33,7 @@ UIAbout::UIAbout(Context* context):
     UIModalOpWindow(context)
     UIModalOpWindow(context)
 {
 {
     TBUI* tbui = GetSubsystem<TBUI>();
     TBUI* tbui = GetSubsystem<TBUI>();
-    window_->SetText("License Agreement");
+    window_->SetText("About the Atomic Game Engine");
     tbui->LoadResourceFile(window_->GetContentRoot(), "AtomicEditor/editor/ui/about.tb.txt");
     tbui->LoadResourceFile(window_->GetContentRoot(), "AtomicEditor/editor/ui/about.tb.txt");
 
 
     TBEditField* age_license = window_->GetWidgetByIDAndType<TBEditField>(TBIDC("age_license"));
     TBEditField* age_license = window_->GetWidgetByIDAndType<TBEditField>(TBIDC("age_license"));

+ 9 - 0
Source/AtomicEditor/Source/UI/UIMainFrame.cpp

@@ -29,6 +29,7 @@
 #include "UIFindTextWidget.h"
 #include "UIFindTextWidget.h"
 #include "../AEEvents.h"
 #include "../AEEvents.h"
 #include "../AEEditor.h"
 #include "../AEEditor.h"
+#include "../AEPreferences.h"
 #include "../AEJavascript.h"
 #include "../AEJavascript.h"
 #include "../Player/AEPlayer.h"
 #include "../Player/AEPlayer.h"
 #include "../Project/AEProject.h"
 #include "../Project/AEProject.h"
@@ -91,6 +92,8 @@ MainFrame::MainFrame(Context* context) :
     menuHelpSource.AddItem(new TBGenericStringItem("API Documentation", TBIDC("help_api")));
     menuHelpSource.AddItem(new TBGenericStringItem("API Documentation", TBIDC("help_api")));
     menuHelpSource.AddItem(new TBGenericStringItem("-"));
     menuHelpSource.AddItem(new TBGenericStringItem("-"));
     menuHelpSource.AddItem(new TBGenericStringItem("Forums", TBIDC("help_forums")));
     menuHelpSource.AddItem(new TBGenericStringItem("Forums", TBIDC("help_forums")));
+    menuHelpSource.AddItem(new TBGenericStringItem("-"));
+    menuHelpSource.AddItem(new TBGenericStringItem("Atomic Game Engine on GitHub", TBIDC("help_github")));
 
 
     TBUI* tbui = GetSubsystem<TBUI>();
     TBUI* tbui = GetSubsystem<TBUI>();
     tbui->LoadResourceFile(delegate_, "AtomicEditor/editor/ui/mainframe.tb.txt");
     tbui->LoadResourceFile(delegate_, "AtomicEditor/editor/ui/mainframe.tb.txt");
@@ -360,6 +363,7 @@ void MainFrame::ShowWelcomeFrame(bool show)
 
 
     if (show)
     if (show)
     {
     {
+        welcomeframe_->UpdateRecentProjects();
         if (!child)
         if (!child)
         {
         {
             resourceviewcontainer_->AddChild(welcomeframe_->GetWidgetDelegate());
             resourceviewcontainer_->AddChild(welcomeframe_->GetWidgetDelegate());
@@ -503,7 +507,12 @@ bool MainFrame::OnEvent(const TBWidgetEvent &ev)
                 fileSystem->SystemOpen("http://www.atomicgameengine.com/forum");
                 fileSystem->SystemOpen("http://www.atomicgameengine.com/forum");
 
 
             }
             }
+            if (ev.ref_id == TBIDC("help_github"))
+            {
 
 
+                fileSystem->SystemOpen("https://github.com/AtomicGameEngine/AtomicGameEngine");
+
+            }
             else if (ev.ref_id == TBIDC("help_api"))
             else if (ev.ref_id == TBIDC("help_api"))
             {
             {
                 #ifdef ATOMIC_PLATFORM_OSX
                 #ifdef ATOMIC_PLATFORM_OSX

+ 3 - 3
Source/AtomicEditor/Source/UI/UIWelcomeFrame.h

@@ -29,6 +29,8 @@ public:
 
 
     bool OnEvent(const TBWidgetEvent &ev);
     bool OnEvent(const TBWidgetEvent &ev);
 
 
+    void UpdateRecentProjects();
+
 private:
 private:
 
 
     struct ExampleInfo
     struct ExampleInfo
@@ -40,9 +42,7 @@ private:
 
 
     void AddExample(const String& name, const String& desc, const String& screenshot, const String &folder);
     void AddExample(const String& name, const String& desc, const String& screenshot, const String &folder);
     void FillExamples();
     void FillExamples();
-    bool HandleExampleCopy(const String& name, const String& exampleFolder, String &atomicProjectFile);
-
-    void UpdateRecentProjects();
+    bool HandleExampleCopy(const String& name, const String& exampleFolder, String &atomicProjectFile);    
 
 
     String exampleInfoDir_;
     String exampleInfoDir_;
     String exampleSourceDir_;
     String exampleSourceDir_;