Browse Source

Merge branch 'master' of https://github.com/AtomicGameEngine/AtomicGameEngine

Josh Engebretson 10 years ago
parent
commit
111065ac89

BIN
Data/AtomicEditor/Resources/EditorData/AtomicEditor/editor/skin/logo_atomic_64.png


+ 5 - 7
Data/AtomicEditor/Resources/EditorData/AtomicEditor/editor/ui/welcomeframe.tb.txt

@@ -22,20 +22,18 @@ TBLayout: distribution: gravity, size: available, axis: y, id: welcomelayout, po
 				"<color #D4FB79>First Steps</color>\n\n" \
 				"<color #D4FB79>First Steps</color>\n\n" \
 				"• Try out some of the example projects!\n\n" \
 				"• Try out some of the example projects!\n\n" \
 				"• Create a new project based on a 2D or 3D template.\n\n" \
 				"• Create a new project based on a 2D or 3D template.\n\n" \
-				"<color #D4FB79>Getting Started Videos</color>\n" \
-				"<widget TBButton: text: 'http://atomicgameengine.com/videos', skin: TBButton.link>\n\n" \
-				"<color #D4FB79>API Documentation</color>\n" \
-				"<widget TBButton: text: 'http://atomicgameengine.com/learn', skin: TBButton.link>\n\n" \
+				"<color #D4FB79>Getting Started Videos & Javascript API Docs</color>\n" \
+				"<widget TBButton: id: 'getting_started' text: 'http://atomicgameengine.com/learn', skin: TBButton.link>\n\n" \
 				"<color #D4FB79>Forum</color>\n" \
 				"<color #D4FB79>Forum</color>\n" \
-				"<widget TBButton: text: 'http://atomicgameengine.com/forum', skin: TBButton.link>\n\n" \
+				"<widget TBButton: id: 'forum' text: 'http://atomicgameengine.com/forum', skin: TBButton.link>\n\n" \
 				"<color #D4FB79>Atomic Game Engine on GitHub</color>\n" \
 				"<color #D4FB79>Atomic Game Engine on GitHub</color>\n" \
-				"<widget TBButton: text: 'https://github.com/AtomicGameEngine', skin: TBButton.link>\n\n"				
+				"<widget TBButton: id: 'atomic_github' text: 'https://github.com/AtomicGameEngine', skin: TBButton.link>\n\n"				
 		TBLayout: distribution: gravity, axis: y, spacing: 12
 		TBLayout: distribution: gravity, axis: y, spacing: 12
 			TBLayout: distribution: gravity, size: available
 			TBLayout: distribution: gravity, size: available
 				TBContainer: gravity: left right
 				TBContainer: gravity: left right
 					TBLayout: distribution: gravity
 					TBLayout: distribution: gravity
 						TBEditField: text: "<color #76D6FF>More Examples:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
 						TBEditField: text: "<color #76D6FF>More Examples:</color>", styling: 1, readonly: 1, adapt-to-content: 1, skin: 0
-						TBButton: text: "https://github.com/AtomicGameEngine/AtomicExamples", skin: TBButton.link
+						TBButton: id: 'examples_github' text: "https://github.com/AtomicGameEngine/AtomicExamples", skin: TBButton.link
 						TBWidget: gravity: left right
 						TBWidget: gravity: left right
 			TBScrollContainer: scroll-mode: auto
 			TBScrollContainer: scroll-mode: auto
 				TBLayout: id: examples_layout, axis: y, spacing: 12
 				TBLayout: id: examples_layout, axis: y, spacing: 12

+ 1 - 11
Source/AtomicEditor/Source/UI/UIMainFrame.cpp

@@ -495,17 +495,6 @@ bool MainFrame::HandlePopupMenuEvent(const TBWidgetEvent &ev)
     {
     {
         Editor* editor = GetSubsystem<Editor>();
         Editor* editor = GetSubsystem<Editor>();
 
 
-        // modals
-        if (ev.target->GetID() == TBIDC("modal_info"))
-        {
-            messageModal_ = 0;
-        }
-        else if (ev.target->GetID() == TBIDC("modal_error"))
-        {
-            messageModal_ = 0;
-        }
-
-
         if (ev.target->GetID() == TBIDC("file popup"))
         if (ev.target->GetID() == TBIDC("file popup"))
         {
         {
             if (ev.ref_id == TBIDC("new project"))
             if (ev.ref_id == TBIDC("new project"))
@@ -524,6 +513,7 @@ bool MainFrame::HandlePopupMenuEvent(const TBWidgetEvent &ev)
                 if (editor->IsProjectLoaded())
                 if (editor->IsProjectLoaded())
                 {
                 {
                     editor->PostModalError("Close Project", "Please close the current project before opening a new one");
                     editor->PostModalError("Close Project", "Please close the current project before opening a new one");
+                    return true;
                 }
                 }
                 else
                 else
                 {
                 {

+ 18 - 1
Source/AtomicEditor/Source/UI/UIWelcomeFrame.cpp

@@ -241,11 +241,28 @@ void WelcomeFrame::UpdateRecentProjects()
 bool WelcomeFrame::OnEvent(const TBWidgetEvent &ev)
 bool WelcomeFrame::OnEvent(const TBWidgetEvent &ev)
 {
 {
     UIModalOps* ops = GetSubsystem<UIModalOps>();
     UIModalOps* ops = GetSubsystem<UIModalOps>();
+    FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (ev.type == EVENT_TYPE_CLICK)
     if (ev.type == EVENT_TYPE_CLICK)
     {
     {
         if (ev.target)
         if (ev.target)
         {
         {
-            if (ev.target->GetID() == TBIDC("open project"))
+            if (ev.target->GetID() == TBIDC("getting_started"))
+            {
+                fileSystem->SystemOpen("http://atomicgameengine.com/videos");
+            }
+            else if (ev.target->GetID() ==  TBIDC("forum"))
+            {
+                fileSystem->SystemOpen("http://atomicgameengine.com/forum");
+            }
+            else if (ev.target->GetID() == TBIDC("atomic_github"))
+            {
+                fileSystem->SystemOpen("https://github.com/AtomicGameEngine/AtomicGameEngine");
+            }
+            else if (ev.target->GetID() == TBIDC("examples_github"))
+            {
+                fileSystem->SystemOpen("https://github.com/AtomicGameEngine/AtomicExamples");
+            }
+            else if (ev.target->GetID() == TBIDC("open project"))
             {
             {
                 GetSubsystem<ProjectUtils>()->OpenProjectFileDialog();
                 GetSubsystem<ProjectUtils>()->OpenProjectFileDialog();
                 return true;
                 return true;