Ivan Safrin 14 лет назад
Родитель
Сommit
40ee2aafec
49 измененных файлов с 904 добавлено и 1014 удалено
  1. BIN
      Assets/Default asset pack/default.pak
  2. 3 3
      Assets/Default asset pack/default/NormalShader.vert
  3. 3 0
      Core/Contents/Source/PolySkeleton.cpp
  4. 107 718
      IDE/Build/Mac OS X/English.lproj/MainMenu.xib
  5. 69 39
      IDE/Build/Mac OS X/Polycode.xcodeproj/project.pbxproj
  6. 3 3
      IDE/Build/Mac OS X/PolycodeAppDelegate.h
  7. 4 7
      IDE/Build/Mac OS X/PolycodeAppDelegate.m
  8. 1 0
      IDE/Contents/Include/NewFileWindow.h
  9. 1 0
      IDE/Contents/Include/NewProjectWindow.h
  10. 1 1
      IDE/Contents/Include/PolycodeEditor.h
  11. 2 2
      IDE/Contents/Include/PolycodeEditorManager.h
  12. 1 1
      IDE/Contents/Include/PolycodeGlobals.h
  13. 2 9
      IDE/Contents/Include/PolycodeIDEApp.h
  14. 1 0
      IDE/Contents/Include/PolycodeProjectBrowser.h
  15. 2 3
      IDE/Contents/Source/NewProjectWindow.cpp
  16. 5 5
      IDE/Contents/Source/PolycodeFontEditor.cpp
  17. 2 2
      IDE/Contents/Source/PolycodeFrame.cpp
  18. 14 12
      IDE/Contents/Source/PolycodeIDEApp.cpp
  19. 2 1
      Modules/Contents/CMakeLists.txt
  20. 67 0
      Modules/Contents/UI/CMakeLists.txt
  21. 19 8
      Modules/Contents/UI/Include/PolyUIBox.h
  22. 19 8
      Modules/Contents/UI/Include/PolyUIButton.h
  23. 20 7
      Modules/Contents/UI/Include/PolyUICheckBox.h
  24. 19 7
      Modules/Contents/UI/Include/PolyUIEvent.h
  25. 20 6
      Modules/Contents/UI/Include/PolyUIHScrollBar.h
  26. 21 8
      Modules/Contents/UI/Include/PolyUIHSlider.h
  27. 19 7
      Modules/Contents/UI/Include/PolyUIImageButton.h
  28. 19 8
      Modules/Contents/UI/Include/PolyUIScrollContainer.h
  29. 24 8
      Modules/Contents/UI/Include/PolyUITextInput.h
  30. 20 8
      Modules/Contents/UI/Include/PolyUITree.h
  31. 19 8
      Modules/Contents/UI/Include/PolyUITreeContainer.h
  32. 19 7
      Modules/Contents/UI/Include/PolyUITreeEvent.h
  33. 19 6
      Modules/Contents/UI/Include/PolyUIVScrollBar.h
  34. 21 9
      Modules/Contents/UI/Include/PolyUIWindow.h
  35. 19 8
      Modules/Contents/UI/Include/PolycodeUI.h
  36. 19 6
      Modules/Contents/UI/Source/PolyUIBox.cpp
  37. 24 7
      Modules/Contents/UI/Source/PolyUIButton.cpp
  38. 23 8
      Modules/Contents/UI/Source/PolyUICheckBox.cpp
  39. 19 6
      Modules/Contents/UI/Source/PolyUIEvent.cpp
  40. 23 6
      Modules/Contents/UI/Source/PolyUIHScrollBar.cpp
  41. 21 8
      Modules/Contents/UI/Source/PolyUIHSlider.cpp
  42. 23 6
      Modules/Contents/UI/Source/PolyUIImageButton.cpp
  43. 23 6
      Modules/Contents/UI/Source/PolyUIScrollContainer.cpp
  44. 27 9
      Modules/Contents/UI/Source/PolyUITextInput.cpp
  45. 25 7
      Modules/Contents/UI/Source/PolyUITree.cpp
  46. 23 6
      Modules/Contents/UI/Source/PolyUITreeContainer.cpp
  47. 19 6
      Modules/Contents/UI/Source/PolyUITreeEvent.cpp
  48. 23 6
      Modules/Contents/UI/Source/PolyUIVScrollBar.cpp
  49. 25 8
      Modules/Contents/UI/Source/PolyUIWindow.cpp

BIN
Assets/Default asset pack/default.pak


+ 3 - 3
Assets/Default asset pack/default/NormalShader.vert

@@ -7,9 +7,9 @@ varying vec4 vertexColor;
 attribute vec3 vTangent;
 
 void main() {
-	normal = gl_NormalMatrix * gl_Normal;
-	tangent = gl_NormalMatrix * vTangent; 
-	binormal = cross(normal, tangent);
+	normal = normalize(gl_NormalMatrix * gl_Normal);
+	tangent = normalize(gl_NormalMatrix * vTangent); 
+	binormal = normalize(cross(normal, tangent));
 	gl_Position = ftransform();
 	pos = gl_ModelViewMatrix * gl_Vertex;
 	rawpos = gl_Vertex;

+ 3 - 0
Core/Contents/Source/PolySkeleton.cpp

@@ -455,6 +455,9 @@ void BoneTrack::Play(bool once) {
 
 void BoneTrack::Update() {
 
+	if(!targetBone)
+		return;
+
 	Matrix4 newMatrix;
 	newMatrix = boneQuat.createMatrix();
 

Разница между файлами не показана из-за своего большого размера
+ 107 - 718
IDE/Build/Mac OS X/English.lproj/MainMenu.xib


+ 69 - 39
IDE/Build/Mac OS X/Polycode.xcodeproj/project.pbxproj

@@ -9,12 +9,7 @@
 /* Begin PBXBuildFile section */
 		1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
 		256AC3DA0F4B6AC300CF3369 /* PolycodeAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* PolycodeAppDelegate.m */; };
-		6D34143012B816B60034FA9B /* libphysfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D34142F12B816B60034FA9B /* libphysfs.a */; };
 		6D34143412B816BC0034FA9B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D34143312B816BC0034FA9B /* IOKit.framework */; };
-		6D3414F812B829C90034FA9B /* libluajit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D3414F712B829C90034FA9B /* libluajit.a */; };
-		6D43F54112AB3E5C001E6D87 /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D43F53F12AB3E5C001E6D87 /* libz.a */; };
-		6D43F54212AB3E5C001E6D87 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D43F54012AB3E5C001E6D87 /* libpng.a */; };
-		6D43F55E12AB3E9E001E6D87 /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D43F55D12AB3E9E001E6D87 /* libfreetype.a */; };
 		6D70AB2A12B29BF200EB6D94 /* NewFileWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D70AB2912B29BF200EB6D94 /* NewFileWindow.cpp */; };
 		6D80E91E12AB53FB0037A708 /* PolycodeFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D80E91912AB53FB0037A708 /* PolycodeFrame.cpp */; };
 		6D80E91F12AB53FB0037A708 /* PolycodeIDEApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D80E91A12AB53FB0037A708 /* PolycodeIDEApp.cpp */; };
@@ -22,17 +17,25 @@
 		6D80E92112AB53FB0037A708 /* PolycodeProjectBrowser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D80E91C12AB53FB0037A708 /* PolycodeProjectBrowser.cpp */; };
 		6D80E92212AB53FB0037A708 /* PolycodeProjectManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D80E91D12AB53FB0037A708 /* PolycodeProjectManager.cpp */; };
 		6D80EB1612AB7C6D0037A708 /* NewProjectWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D80EB1512AB7C6D0037A708 /* NewProjectWindow.cpp */; };
+		6D8A55B214B3EA6C005F6411 /* libPolycore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D8A55B114B3EA6C005F6411 /* libPolycore.a */; };
+		6D8A55B914B3EABB005F6411 /* main_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6D8A55B814B3EABB005F6411 /* main_icon.icns */; };
+		6D8A55BC14B3EACB005F6411 /* PolycodeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6D8A55BB14B3EACB005F6411 /* PolycodeView.mm */; };
 		6D91B3B512AF2B1D00261ED4 /* PolycodeTextEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D91B3B412AF2B1D00261ED4 /* PolycodeTextEditor.cpp */; };
 		6DCE857A12AE018800566FAE /* PolycodeEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DCE857812AE018800566FAE /* PolycodeEditor.cpp */; };
 		6DCE857B12AE018800566FAE /* PolycodeEditorManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DCE857912AE018800566FAE /* PolycodeEditorManager.cpp */; };
 		6DCE85B712AE082B00566FAE /* PolycodeImageEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DCE85B612AE082B00566FAE /* PolycodeImageEditor.cpp */; };
 		6DCE865512AE146C00566FAE /* PolycodeFontEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DCE865412AE146C00566FAE /* PolycodeFontEditor.cpp */; };
-		6DFBF5C012A3660300C43A7D /* libPolyCore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFBF5BF12A3660300C43A7D /* libPolyCore.a */; };
-		6DFBF60412A370ED00C43A7D /* PolySubstanceView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6DFBF60312A370ED00C43A7D /* PolySubstanceView.m */; };
 		6DFBF64A12A3758400C43A7D /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFBF64812A3758400C43A7D /* OpenAL.framework */; };
 		6DFBF64B12A3758400C43A7D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFBF64912A3758400C43A7D /* OpenGL.framework */; };
-		6DFBF8AB12A3F30F00C43A7D /* libPolycodeUI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFBF8AA12A3F30F00C43A7D /* libPolycodeUI.a */; };
-		6DFF70531342F77200B0C47E /* main_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6DFF70521342F77200B0C47E /* main_icon.icns */; };
+		6DFE89BD14B3FC0900DA7ABD /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89B614B3FC0900DA7ABD /* libfreetype.a */; };
+		6DFE89BE14B3FC0900DA7ABD /* liblibogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89B714B3FC0900DA7ABD /* liblibogg.a */; };
+		6DFE89BF14B3FC0900DA7ABD /* liblibvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89B814B3FC0900DA7ABD /* liblibvorbis.a */; };
+		6DFE89C014B3FC0900DA7ABD /* liblibvorbisfile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89B914B3FC0900DA7ABD /* liblibvorbisfile.a */; };
+		6DFE89C114B3FC0900DA7ABD /* libphysfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89BA14B3FC0900DA7ABD /* libphysfs.a */; };
+		6DFE89C214B3FC0900DA7ABD /* libpng15.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89BB14B3FC0900DA7ABD /* libpng15.a */; };
+		6DFE89C314B3FC0900DA7ABD /* libz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89BC14B3FC0900DA7ABD /* libz.a */; };
+		6DFE89C514B3FC1700DA7ABD /* libPolycodeUI.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6DFE89C414B3FC1700DA7ABD /* libPolycodeUI.a */; };
+		6DFE89CC14B3FE3D00DA7ABD /* default.pak in Resources */ = {isa = PBXBuildFile; fileRef = 6DFE89CB14B3FE3D00DA7ABD /* default.pak */; };
 		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
 		8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
 		8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@@ -61,12 +64,7 @@
 		29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
 		29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
-		6D34142F12B816B60034FA9B /* libphysfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libphysfs.a; path = ../../../Core/Dependencies/physfs/Debug/libphysfs.a; sourceTree = SOURCE_ROOT; };
 		6D34143312B816BC0034FA9B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; };
-		6D3414F712B829C90034FA9B /* libluajit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluajit.a; path = ../../../Core/Dependencies/luajit/src/libluajit.a; sourceTree = SOURCE_ROOT; };
-		6D43F53F12AB3E5C001E6D87 /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = ../../../Core/Dependencies/zlib/libz.a; sourceTree = SOURCE_ROOT; };
-		6D43F54012AB3E5C001E6D87 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = ../../../Core/Dependencies/libpng/libpng.a; sourceTree = SOURCE_ROOT; };
-		6D43F55D12AB3E9E001E6D87 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../../../Core/Dependencies/freetype/libfreetype.a; sourceTree = SOURCE_ROOT; };
 		6D70AB2812B29BEC00EB6D94 /* NewFileWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewFileWindow.h; sourceTree = "<group>"; };
 		6D70AB2912B29BF200EB6D94 /* NewFileWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewFileWindow.cpp; sourceTree = "<group>"; };
 		6D80E91312AB53FB0037A708 /* PolycodeFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeFrame.h; sourceTree = "<group>"; };
@@ -82,6 +80,10 @@
 		6D80EB1512AB7C6D0037A708 /* NewProjectWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewProjectWindow.cpp; sourceTree = "<group>"; };
 		6D80EB1712AB7C740037A708 /* NewProjectWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewProjectWindow.h; sourceTree = "<group>"; };
 		6D80EBAC12AB852B0037A708 /* PolycodeGlobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeGlobals.h; sourceTree = "<group>"; };
+		6D8A55B114B3EA6C005F6411 /* libPolycore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolycore.a; path = ../../../Release/Darwin/Framework/Core/lib/libPolycore.a; sourceTree = "<group>"; };
+		6D8A55B814B3EABB005F6411 /* main_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = main_icon.icns; path = ../../../Assets/Icons/main_icon.icns; sourceTree = "<group>"; };
+		6D8A55BA14B3EACB005F6411 /* PolycodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolycodeView.h; path = ../../../Release/Darwin/Framework/Core/PolycodeView/PolycodeView.h; sourceTree = "<group>"; };
+		6D8A55BB14B3EACB005F6411 /* PolycodeView.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = PolycodeView.mm; path = ../../../Release/Darwin/Framework/Core/PolycodeView/PolycodeView.mm; sourceTree = "<group>"; };
 		6D91B3B312AF2B1600261ED4 /* PolycodeTextEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeTextEditor.h; sourceTree = "<group>"; };
 		6D91B3B412AF2B1D00261ED4 /* PolycodeTextEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolycodeTextEditor.cpp; sourceTree = "<group>"; };
 		6DCE857612AE018000566FAE /* PolycodeEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeEditor.h; sourceTree = "<group>"; };
@@ -92,13 +94,17 @@
 		6DCE85B612AE082B00566FAE /* PolycodeImageEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolycodeImageEditor.cpp; sourceTree = "<group>"; };
 		6DCE865312AE146600566FAE /* PolycodeFontEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolycodeFontEditor.h; sourceTree = "<group>"; };
 		6DCE865412AE146C00566FAE /* PolycodeFontEditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolycodeFontEditor.cpp; sourceTree = "<group>"; };
-		6DFBF5BF12A3660300C43A7D /* libPolyCore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolyCore.a; path = "../../../Core/Build/Mac OS X/build/Debug/libPolyCore.a"; sourceTree = SOURCE_ROOT; };
-		6DFBF60212A370DB00C43A7D /* PolySubstanceView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolySubstanceView.h; path = ../../../Core/Contents/Include/PolySubstanceView.h; sourceTree = SOURCE_ROOT; };
-		6DFBF60312A370ED00C43A7D /* PolySubstanceView.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; name = PolySubstanceView.m; path = ../../../Core/Contents/Source/PolySubstanceView.m; sourceTree = SOURCE_ROOT; };
 		6DFBF64812A3758400C43A7D /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
 		6DFBF64912A3758400C43A7D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
-		6DFBF8AA12A3F30F00C43A7D /* libPolycodeUI.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolycodeUI.a; path = "../../../Modules/Build/Mac OS X/build/Debug/libPolycodeUI.a"; sourceTree = SOURCE_ROOT; };
-		6DFF70521342F77200B0C47E /* main_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = main_icon.icns; path = ../../../Assets/main_icon.icns; sourceTree = SOURCE_ROOT; };
+		6DFE89B614B3FC0900DA7ABD /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/libfreetype.a; sourceTree = "<group>"; };
+		6DFE89B714B3FC0900DA7ABD /* liblibogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblibogg.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/liblibogg.a; sourceTree = "<group>"; };
+		6DFE89B814B3FC0900DA7ABD /* liblibvorbis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblibvorbis.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/liblibvorbis.a; sourceTree = "<group>"; };
+		6DFE89B914B3FC0900DA7ABD /* liblibvorbisfile.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblibvorbisfile.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/liblibvorbisfile.a; sourceTree = "<group>"; };
+		6DFE89BA14B3FC0900DA7ABD /* libphysfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libphysfs.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/libphysfs.a; sourceTree = "<group>"; };
+		6DFE89BB14B3FC0900DA7ABD /* libpng15.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng15.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/libpng15.a; sourceTree = "<group>"; };
+		6DFE89BC14B3FC0900DA7ABD /* libz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libz.a; path = ../../../Release/Darwin/Framework/Core/Dependencies/lib/libz.a; sourceTree = "<group>"; };
+		6DFE89C414B3FC1700DA7ABD /* libPolycodeUI.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libPolycodeUI.a; path = ../../../Release/Darwin/Framework/Modules/lib/libPolycodeUI.a; sourceTree = "<group>"; };
+		6DFE89CB14B3FE3D00DA7ABD /* default.pak */ = {isa = PBXFileReference; lastKnownFileType = file; name = default.pak; path = ../../../Release/Darwin/Framework/Core/Assets/default.pak; sourceTree = "<group>"; };
 		8D1107310486CEB800E47090 /* Polycode-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Polycode-Info.plist"; sourceTree = "<group>"; };
 		8D1107320486CEB800E47090 /* Polycode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Polycode.app; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -109,16 +115,18 @@
 			buildActionMask = 2147483647;
 			files = (
 				8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
-				6DFBF5C012A3660300C43A7D /* libPolyCore.a in Frameworks */,
 				6DFBF64A12A3758400C43A7D /* OpenAL.framework in Frameworks */,
 				6DFBF64B12A3758400C43A7D /* OpenGL.framework in Frameworks */,
-				6DFBF8AB12A3F30F00C43A7D /* libPolycodeUI.a in Frameworks */,
-				6D43F54112AB3E5C001E6D87 /* libz.a in Frameworks */,
-				6D43F54212AB3E5C001E6D87 /* libpng.a in Frameworks */,
-				6D43F55E12AB3E9E001E6D87 /* libfreetype.a in Frameworks */,
-				6D34143012B816B60034FA9B /* libphysfs.a in Frameworks */,
 				6D34143412B816BC0034FA9B /* IOKit.framework in Frameworks */,
-				6D3414F812B829C90034FA9B /* libluajit.a in Frameworks */,
+				6D8A55B214B3EA6C005F6411 /* libPolycore.a in Frameworks */,
+				6DFE89BD14B3FC0900DA7ABD /* libfreetype.a in Frameworks */,
+				6DFE89BE14B3FC0900DA7ABD /* liblibogg.a in Frameworks */,
+				6DFE89BF14B3FC0900DA7ABD /* liblibvorbis.a in Frameworks */,
+				6DFE89C014B3FC0900DA7ABD /* liblibvorbisfile.a in Frameworks */,
+				6DFE89C114B3FC0900DA7ABD /* libphysfs.a in Frameworks */,
+				6DFE89C214B3FC0900DA7ABD /* libpng15.a in Frameworks */,
+				6DFE89C314B3FC0900DA7ABD /* libz.a in Frameworks */,
+				6DFE89C514B3FC1700DA7ABD /* libPolycodeUI.a in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -137,16 +145,18 @@
 		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
 			isa = PBXGroup;
 			children = (
-				6D3414F712B829C90034FA9B /* libluajit.a */,
+				6DFE89C414B3FC1700DA7ABD /* libPolycodeUI.a */,
+				6DFE89B614B3FC0900DA7ABD /* libfreetype.a */,
+				6DFE89B714B3FC0900DA7ABD /* liblibogg.a */,
+				6DFE89B814B3FC0900DA7ABD /* liblibvorbis.a */,
+				6DFE89B914B3FC0900DA7ABD /* liblibvorbisfile.a */,
+				6DFE89BA14B3FC0900DA7ABD /* libphysfs.a */,
+				6DFE89BB14B3FC0900DA7ABD /* libpng15.a */,
+				6DFE89BC14B3FC0900DA7ABD /* libz.a */,
+				6D8A55B114B3EA6C005F6411 /* libPolycore.a */,
 				6D34143312B816BC0034FA9B /* IOKit.framework */,
-				6D34142F12B816B60034FA9B /* libphysfs.a */,
-				6D43F55D12AB3E9E001E6D87 /* libfreetype.a */,
-				6D43F53F12AB3E5C001E6D87 /* libz.a */,
-				6D43F54012AB3E5C001E6D87 /* libpng.a */,
-				6DFBF8AA12A3F30F00C43A7D /* libPolycodeUI.a */,
 				6DFBF64812A3758400C43A7D /* OpenAL.framework */,
 				6DFBF64912A3758400C43A7D /* OpenGL.framework */,
-				6DFBF5BF12A3660300C43A7D /* libPolyCore.a */,
 				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
 			);
 			name = "Linked Frameworks";
@@ -185,8 +195,8 @@
 		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
 			isa = PBXGroup;
 			children = (
-				6DFBF60312A370ED00C43A7D /* PolySubstanceView.m */,
-				6DFBF60212A370DB00C43A7D /* PolySubstanceView.h */,
+				6D8A55BA14B3EACB005F6411 /* PolycodeView.h */,
+				6D8A55BB14B3EACB005F6411 /* PolycodeView.mm */,
 				256AC3D80F4B6AC300CF3369 /* PolycodeAppDelegate.h */,
 				256AC3D90F4B6AC300CF3369 /* PolycodeAppDelegate.m */,
 				256AC3F00F4B6AF500CF3369 /* Polycode_Prefix.pch */,
@@ -198,7 +208,8 @@
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
 			isa = PBXGroup;
 			children = (
-				6DFF70521342F77200B0C47E /* main_icon.icns */,
+				6DFE89CB14B3FE3D00DA7ABD /* default.pak */,
+				6D8A55B814B3EABB005F6411 /* main_icon.icns */,
 				8D1107310486CEB800E47090 /* Polycode-Info.plist */,
 				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
 				1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
@@ -310,7 +321,8 @@
 			files = (
 				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
 				1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
-				6DFF70531342F77200B0C47E /* main_icon.icns in Resources */,
+				6D8A55B914B3EABB005F6411 /* main_icon.icns in Resources */,
+				6DFE89CC14B3FE3D00DA7ABD /* default.pak in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -328,7 +340,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "cp -R ../../Contents/Resources/* build/Debug/Polycode.app/Contents/Resources\ncp ../../../Core/Dependencies/luajit/src/libluajit.so build/Debug/Polycode.app/Contents/MacOS\ninstall_name_tool -change \"libluajit.so\" \"@executable_path/libluajit.so\" build/Debug/Polycode.app/Contents/MacOS/Polycode";
+			shellScript = "cp -R \"$PROJECT_DIR/../../Contents/Resources\" \"$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH\"";
 		};
 /* End PBXShellScriptBuildPhase section */
 
@@ -339,7 +351,6 @@
 			files = (
 				8D11072D0486CEB800E47090 /* main.m in Sources */,
 				256AC3DA0F4B6AC300CF3369 /* PolycodeAppDelegate.m in Sources */,
-				6DFBF60412A370ED00C43A7D /* PolySubstanceView.m in Sources */,
 				6D80E91E12AB53FB0037A708 /* PolycodeFrame.cpp in Sources */,
 				6D80E91F12AB53FB0037A708 /* PolycodeIDEApp.cpp in Sources */,
 				6D80E92012AB53FB0037A708 /* PolycodeProject.cpp in Sources */,
@@ -352,6 +363,7 @@
 				6DCE865512AE146C00566FAE /* PolycodeFontEditor.cpp in Sources */,
 				6D91B3B512AF2B1D00261ED4 /* PolycodeTextEditor.cpp in Sources */,
 				6D70AB2A12B29BF200EB6D94 /* NewFileWindow.cpp in Sources */,
+				6D8A55BC14B3EACB005F6411 /* PolycodeView.mm in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -388,6 +400,12 @@
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Polycode_Prefix.pch;
+				HEADER_SEARCH_PATHS = (
+					/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers,
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/include\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/Dependencies/include\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Modules/include\"",
+				);
 				INFOPLIST_FILE = "Polycode-Info.plist";
 				INSTALL_PATH = "$(HOME)/Applications";
 				LIBRARY_SEARCH_PATHS = (
@@ -403,6 +421,9 @@
 					"\"$(SRCROOT)/../../../Core/Dependencies/zlib\"",
 					"\"$(SRCROOT)/../../../Core/Dependencies/libpng\"",
 					"\"$(SRCROOT)/../../../Core/Dependencies/luajit/src\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/lib\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/Dependencies/lib\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Modules/lib\"",
 				);
 				PRODUCT_NAME = Polycode;
 			};
@@ -416,6 +437,12 @@
 				GCC_MODEL_TUNING = G5;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
 				GCC_PREFIX_HEADER = Polycode_Prefix.pch;
+				HEADER_SEARCH_PATHS = (
+					/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers,
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/include\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/Dependencies/include\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Modules/include\"",
+				);
 				INFOPLIST_FILE = "Polycode-Info.plist";
 				INSTALL_PATH = "$(HOME)/Applications";
 				LIBRARY_SEARCH_PATHS = (
@@ -431,6 +458,9 @@
 					"\"$(SRCROOT)/../../../Core/Dependencies/zlib\"",
 					"\"$(SRCROOT)/../../../Core/Dependencies/libpng\"",
 					"\"$(SRCROOT)/../../../Core/Dependencies/luajit/src\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/lib\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Core/Dependencies/lib\"",
+					"\"$(SRCROOT)/../../../Release/Darwin/Framework/Modules/lib\"",
 				);
 				PRODUCT_NAME = Polycode;
 			};

+ 3 - 3
IDE/Build/Mac OS X/PolycodeAppDelegate.h

@@ -7,7 +7,7 @@
 //
 
 #import <Cocoa/Cocoa.h>
-#import "PolySubstanceView.h"
+#import "PolycodeView.h"
 
 #include "Polycode.h"
 #include "PolycodeIDEApp.h"
@@ -34,7 +34,7 @@ public:
 @interface PolycodeAppDelegate : NSObject <NSApplicationDelegate> {
     NSWindow *window;	
 	PolycodeIDEApp *app;
-	SubstanceView *substanceView;
+	PolycodeView *polycodeView;
 	PolycodeAppEventHandler *eventHandler;
 	NSTimer* timer;
 	
@@ -43,7 +43,7 @@ public:
 	BOOL mustShowProjectMenu;
 }
 
-@property (assign) IBOutlet SubstanceView *substanceView;
+@property (assign) IBOutlet PolycodeView *polycodeView;
 @property (assign) IBOutlet NSWindow *window;
 @property (assign) IBOutlet NSMenu *projectMenu;
 

+ 4 - 7
IDE/Build/Mac OS X/PolycodeAppDelegate.m

@@ -11,7 +11,7 @@
 @implementation PolycodeAppDelegate
 
 @synthesize window;
-@synthesize substanceView;
+@synthesize polycodeView;
 @synthesize projectMenu;
 
 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
@@ -22,7 +22,7 @@
 	eventHandler = new PolycodeAppEventHandler();
 	eventHandler->appDelegate = self;
 	
-	app = new PolycodeIDEApp(substanceView);
+	app = new PolycodeIDEApp(polycodeView);
 	app->addEventListener(eventHandler, PolycodeIDEApp::EVENT_SHOW_MENU);
 	
 	timer = [NSTimer timerWithTimeInterval:(1.0f/90.0f) target:self selector:@selector(animationTimer:) userInfo:nil repeats:YES];
@@ -37,7 +37,7 @@
 	}
 	
 	if(mustShowProjectMenu) {
-		NSPoint menuOrigin = NSMakePoint(substanceView.mouseX, substanceView.mouseY);
+		NSPoint menuOrigin = NSMakePoint(polycodeView.mouseX, polycodeView.mouseY);
 		
 		NSEvent *event =  [NSEvent mouseEventWithType:NSLeftMouseDown
 											 location:menuOrigin
@@ -49,7 +49,7 @@
 										   clickCount:1
 											 pressure:1];	
 		
-		[NSMenu popUpContextMenu:projectMenu withEvent:event forView:substanceView];
+		[NSMenu popUpContextMenu:projectMenu withEvent:event forView:polycodeView];
 		
 		mustShowProjectMenu = NO;
 	}
@@ -60,9 +60,6 @@
 	mustShowProjectMenu = YES;	
 }
 
-- (void)applicationWillTerminate:(NSNotification *)aNotification {
-	delete app;
-}
 
 -(void) newProject: (id) sender {
 	app->newProject();

+ 1 - 0
IDE/Contents/Include/NewFileWindow.h

@@ -5,6 +5,7 @@
 #include "PolycodeGlobals.h"
 #include "PolycodeUI.h"
 #include "Polycode.h"
+#include "OSBasics.h"
 
 using namespace Polycode;
 

+ 1 - 0
IDE/Contents/Include/NewProjectWindow.h

@@ -4,6 +4,7 @@
 #include "PolycodeGlobals.h"
 #include "PolycodeUI.h"
 #include "Polycode.h"
+#include "OSBasics.h"
 
 using namespace Polycode;
 

+ 1 - 1
IDE/Contents/Include/PolycodeEditor.h

@@ -35,6 +35,6 @@ public:
 	bool canHandleExtension(String extension);
 	
 protected:
-	vector<string> extensions;
+	std::vector<std::string> extensions;
 	
 };

+ 2 - 2
IDE/Contents/Include/PolycodeEditorManager.h

@@ -24,6 +24,6 @@ protected:
 	
 	PolycodeEditor *currentEditor;
 	
-	vector<PolycodeEditor*> openEditors;
-	vector<PolycodeEditorFactory*> editorFactories;	
+	std::vector<PolycodeEditor*> openEditors;
+	std::vector<PolycodeEditorFactory*> editorFactories;	
 };

+ 1 - 1
IDE/Contents/Include/PolycodeGlobals.h

@@ -1,4 +1,4 @@
 
 #pragma once
 
-#define RESOURCE_PATH "Contents/Resources/"
+#define RESOURCE_PATH ""

+ 2 - 9
IDE/Contents/Include/PolycodeIDEApp.h

@@ -7,7 +7,7 @@
  *
  */
 
-#import "PolySubstanceView.h"
+#import "PolycodeView.h"
 
 #include "PolycodeGlobals.h"
 #include "PolycodeProjectManager.h"
@@ -21,17 +21,11 @@
 #include "PolycodeFontEditor.h"
 #include "PolycodeTextEditor.h"
 
-extern "C" {	
-#include <stdio.h>
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-	
 using namespace Polycode;
 
 class PolycodeIDEApp : public EventDispatcher {
 public:
-	PolycodeIDEApp(SubstanceView *view);
+	PolycodeIDEApp(PolycodeView *view);
 	~PolycodeIDEApp();
 	
 	void handleEvent(Event *event);	
@@ -57,4 +51,3 @@ protected:
 	PolycodeProjectManager *projectManager;
 	
 };
-}

+ 1 - 0
IDE/Contents/Include/PolycodeProjectBrowser.h

@@ -4,6 +4,7 @@
 #include <Polycode.h>
 #include <PolycodeUI.h>
 #include "PolycodeProject.h"
+#include "OSBasics.h"
 
 using namespace Polycode;
 

+ 2 - 3
IDE/Contents/Source/NewProjectWindow.cpp

@@ -2,7 +2,6 @@
 
 #include "NewProjectWindow.h"
 
-
 NewProjectWindow::NewProjectWindow() : UIWindow(L"Create New Project", 500, 300){
 	
 	templateFolder = "";
@@ -43,7 +42,7 @@ NewProjectWindow::NewProjectWindow() : UIWindow(L"Create New Project", 500, 300)
 		}
 	}
 	
-	ScreenLabel *label2 = new ScreenLabel(fontName, L"Project Name", fontSize, Label::ANTIALIAS_FULL);
+	ScreenLabel *label2 = new ScreenLabel(L"Project Name", fontSize, fontName, Label::ANTIALIAS_FULL);
 	addChild(label2);
 	label2->setPosition(padding+220, templateContainer->getPosition().y);		
 
@@ -51,7 +50,7 @@ NewProjectWindow::NewProjectWindow() : UIWindow(L"Create New Project", 500, 300)
 	addChild(projectNameInput);
 	projectNameInput->setPosition(label2->getPosition().x, label2->getPosition().y+label2->getHeight()+2);
 	
-	ScreenLabel *label3 = new ScreenLabel(fontName, L"Project Location", fontSize, Label::ANTIALIAS_FULL);
+	ScreenLabel *label3 = new ScreenLabel(L"Project Location", fontSize, fontName, Label::ANTIALIAS_FULL);
 	addChild(label3);
 	label3->setPosition(padding+220, templateContainer->getPosition().y+50);		
 	

+ 5 - 5
IDE/Contents/Source/PolycodeFontEditor.cpp

@@ -35,19 +35,19 @@ bool PolycodeFontEditor::openFile(String filePath) {
 	anchor->addChild(bg);
 	anchor->snapToPixels = true;
 	
-	editorLabel = new ScreenLabel(filePath, L"ABCDEFGHIJKLM", 48, Label::ANTIALIAS_FULL);
+	editorLabel = new ScreenLabel(L"ABCDEFGHIJKLM", 48, filePath, Label::ANTIALIAS_FULL);
 	anchor->addChild(editorLabel);
-	editorLabel2 = new ScreenLabel(filePath, L"NOPQRSTUVWXYZ", 48, Label::ANTIALIAS_FULL);
+	editorLabel2 = new ScreenLabel(L"NOPQRSTUVWXYZ", 48, filePath, Label::ANTIALIAS_FULL);
 	editorLabel2->setPosition(0, 48);
 	editorLabel->setPosition((editorLabel2->getWidth()-editorLabel->getWidth())/2, 0);
 	anchor->addChild(editorLabel2);
-	editorLabel3 = new ScreenLabel(filePath, L"abcdefghijklm", 48, Label::ANTIALIAS_FULL);
+	editorLabel3 = new ScreenLabel(L"abcdefghijklm", 48, filePath, Label::ANTIALIAS_FULL);
 	editorLabel3->setPosition((editorLabel2->getWidth()-editorLabel3->getWidth())/2, 96);	
 	anchor->addChild(editorLabel3);
-	editorLabel4 = new ScreenLabel(filePath, L"nopqrstuvwxyz", 48, Label::ANTIALIAS_FULL);
+	editorLabel4 = new ScreenLabel(L"nopqrstuvwxyz", 48, filePath, Label::ANTIALIAS_FULL);
 	editorLabel4->setPosition((editorLabel2->getWidth()-editorLabel4->getWidth())/2, 144);		
 	anchor->addChild(editorLabel4);
-	editorLabel5 = new ScreenLabel(filePath, L"1234567890", 48, Label::ANTIALIAS_FULL);
+	editorLabel5 = new ScreenLabel(L"1234567890", 48, filePath, Label::ANTIALIAS_FULL);
 	editorLabel5->setPosition((editorLabel2->getWidth()-editorLabel5->getWidth())/2, 192);			
 	anchor->addChild(editorLabel5);
 

+ 2 - 2
IDE/Contents/Source/PolycodeFrame.cpp

@@ -25,10 +25,10 @@ PolycodeFrame::PolycodeFrame() : ScreenEntity() {
 	topBarBg->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
 	addChild(topBarBg);
 	
-	logo = new ScreenImage("barlogo.png");	
+	logo = new ScreenImage("Images/barlogo.png");	
 	addChild(logo);		
 	
-	resizer = new ScreenImage("corner_resize.png");	
+	resizer = new ScreenImage("Images/corner_resize.png");	
 	addChild(resizer);
 	resizer->setColor(0,0,0,0.4);
 	

+ 14 - 12
IDE/Contents/Source/PolycodeIDEApp.cpp

@@ -13,20 +13,22 @@
 
 using namespace Polycode;
 
-PolycodeIDEApp::PolycodeIDEApp(SubstanceView *view) : EventDispatcher() {
-	core = new CocoaCore(view, 800,600,false,0,60);	
+PolycodeIDEApp::PolycodeIDEApp(PolycodeView *view) : EventDispatcher() {
+	core = new CocoaCore(view, 800,600,false,false, 0, 0,60);	
 	core->addEventListener(this, Core::EVENT_CORE_RESIZE);	
-	CoreServices::getInstance()->getRenderer()->setClearColor(0.4,0.4,0.4);
-		
+	CoreServices::getInstance()->getRenderer()->setClearColor(0.2,0.2,0.2);
+	
+	CoreServices::getInstance()->getRenderer()->setTextureFilteringMode(Renderer::TEX_FILTERING_NEAREST);
+				
+	CoreServices::getInstance()->getResourceManager()->addArchive("default.pak");
+	CoreServices::getInstance()->getResourceManager()->addDirResource("default");	
+
 	CoreServices::getInstance()->getConfig()->loadConfig("Polycode", RESOURCE_PATH"UIThemes/default/theme.xml");
 	CoreServices::getInstance()->getResourceManager()->addDirResource(RESOURCE_PATH"UIThemes/default/", false);
-	CoreServices::getInstance()->getResourceManager()->addDirResource(RESOURCE_PATH"Images/", false);
-	
-//	CoreServices::getInstance()->getFontManager()->registerFont("sans", RESOURCE_PATH"Fonts/DejaVuSans.ttf");
-//	CoreServices::getInstance()->getFontManager()->registerFont("mono", RESOURCE_PATH"Fonts/DejaVuSansMono.ttf");	
-	CoreServices::getInstance()->getFontManager()->registerFont("sans",  "/System/Library/Fonts/LucidaGrande.ttc");	
-	CoreServices::getInstance()->getFontManager()->registerFont("mono", "/System/Library/Fonts/Monaco.dfont");	
+	CoreServices::getInstance()->getResourceManager()->addDirResource(RESOURCE_PATH"Images/", false);	
 	
+	CoreServices::getInstance()->getRenderer()->setTextureFilteringMode(Renderer::TEX_FILTERING_LINEAR);
+		
 	printf("creating font editor\n"); 
 	
 	Screen *screen = new Screen();	
@@ -51,7 +53,7 @@ PolycodeIDEApp::PolycodeIDEApp(SubstanceView *view) : EventDispatcher() {
 	frame->getProjectBrowser()->addEventListener(this, PolycodeProjectBrowserEvent::SHOW_MENU);
 	
 	frame->Resize(core->getXRes(), core->getYRes());	
-	core->setVideoMode(1000, 600, false, 0);
+	core->setVideoMode(1000, 600, false, false, 0, 0);
 	
 	
 //	CoreServices::getInstance()->getResourceManager()->addArchive(RESOURCE_PATH"tomato.polyapp");
@@ -89,7 +91,7 @@ void PolycodeIDEApp::openProject() {
 	ext.extension = "polyproject";
 	ext.description = "Polycode Project File";
 	extensions.push_back(ext);
-	vector<string> paths = core->openFilePicker(extensions, false);
+	std::vector<String> paths = core->openFilePicker(extensions, false);
 	if(paths[0] != "") {
 		PolycodeProject *project = projectManager->openProject(paths[0]);
 		projectManager->setActiveProject(project);

+ 2 - 1
Modules/Contents/CMakeLists.txt

@@ -14,5 +14,6 @@ FIND_PACKAGE(Freenect)
 IF(FREENECT_FOUND)
     ADD_SUBDIRECTORY(Kinect)
 ENDIF(FREENECT_FOUND)
-  
+ 
+ADD_SUBDIRECTORY(UI)
 ADD_SUBDIRECTORY(Networking)

+ 67 - 0
Modules/Contents/UI/CMakeLists.txt

@@ -0,0 +1,67 @@
+INCLUDE(PolycodeIncludes)
+
+SET(polycodeUI_SRCS
+    Source/PolyUIBox.cpp
+    Source/PolyUIButton.cpp
+    Source/PolyUICheckBox.cpp
+    Source/PolyUIEvent.cpp
+    Source/PolyUIHScrollBar.cpp
+    Source/PolyUIHSlider.cpp
+    Source/PolyUIImageButton.cpp
+    Source/PolyUIScrollContainer.cpp
+    Source/PolyUITextInput.cpp
+    Source/PolyUITree.cpp
+    Source/PolyUITreeContainer.cpp
+    Source/PolyUITreeEvent.cpp
+    Source/PolyUIVScrollBar.cpp
+    Source/PolyUIWindow.cpp
+)
+
+SET(polycodeUI_HDRS
+    Include/PolycodeUI.h
+    Include/PolyUIBox.h
+    Include/PolyUIButton.h
+    Include/PolyUICheckBox.h
+    Include/PolyUIEvent.h
+    Include/PolyUIHScrollBar.h
+    Include/PolyUIHSlider.h
+    Include/PolyUIImageButton.h
+    Include/PolyUIScrollContainer.h
+    Include/PolyUITextInput.h
+    Include/PolyUITree.h
+    Include/PolyUITreeContainer.h
+    Include/PolyUITreeEvent.h
+    Include/PolyUIVScrollBar.h
+    Include/PolyUIWindow.h
+)
+
+INCLUDE_DIRECTORIES(
+    Include
+)
+
+SET(CMAKE_DEBUG_POSTFIX "_d")
+
+ADD_LIBRARY(PolycodeUI ${polycodeUI_SRCS} ${polycodeUI_HDRS})
+
+TARGET_LINK_LIBRARIES(PolycodeUI 
+    Polycore 
+    ${BOX2D_LIBRARIES}
+    ${OPENGL_LIBRARIES}
+    ${OPENAL_LIBRARY}
+    ${PNG_LIBRARIES}
+    ${FREETYPE_LIBRARIES}
+    ${PHYSFS_LIBRARY}
+    ${VORBISFILE_LIBRARY})
+IF(APPLE)
+    TARGET_LINK_LIBRARIES(PolycodeUI "-framework Cocoa")
+ENDIF(APPLE)
+
+IF(POLYCODE_INSTALL_FRAMEWORK)
+    
+    # install headers
+    INSTALL(FILES ${polycodeUI_HDRS} DESTINATION Modules/include)
+    # install libraries
+    INSTALL(TARGETS PolycodeUI DESTINATION Modules/lib)
+    
+ENDIF(POLYCODE_INSTALL_FRAMEWORK)
+

+ 19 - 8
Modules/Contents/UI/Include/PolyUIBox.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUIBox.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyScreenImage.h"

+ 19 - 8
Modules/Contents/UI/Include/PolyUIButton.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUIButton.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/1/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyScreenLabel.h"

+ 20 - 7
Modules/Contents/UI/Include/PolyUICheckBox.h

@@ -1,12 +1,24 @@
 /*
- *  PolyUICheckBox.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/8/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
-// @package UI
 
 #pragma once
 #include "PolyGlobals.h"
@@ -15,6 +27,7 @@
 #include "PolyScreenShape.h"
 #include "PolyScreenEntity.h"
 #include "PolyUIEvent.h"
+#include "PolyFont.h"
 
 namespace Polycode {
 

+ 19 - 7
Modules/Contents/UI/Include/PolyUIEvent.h

@@ -1,12 +1,24 @@
 /*
- *  PolyUIEvent.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
-// @package UI
 
 #pragma once
 #include "PolyGlobals.h"

+ 20 - 6
Modules/Contents/UI/Include/PolyUIHScrollBar.h

@@ -1,11 +1,25 @@
 /*
- *  PolyUIHScrollBar.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/26/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
+ 
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyUIBox.h"

+ 21 - 8
Modules/Contents/UI/Include/PolyUIHSlider.h

@@ -1,20 +1,33 @@
 /*
- *  PolyUIHSlider.h
- *  Poly
- *
- *  Created by Ivan Safrin on 8/7/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyScreenLabel.h"
 #include "PolyScreenShape.h"
 #include "PolyScreenEntity.h"
 #include "PolyUIEvent.h"
+#include "PolyInputEvent.h"
+#include "PolyFont.h"
 
 namespace Polycode {
 

+ 19 - 7
Modules/Contents/UI/Include/PolyUIImageButton.h

@@ -1,12 +1,24 @@
 /*
- *  PolyUIImageButton.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/29/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
-// @package UI
 
 #pragma once
 #include "PolyGlobals.h"

+ 19 - 8
Modules/Contents/UI/Include/PolyUIScrollContainer.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUIScrollContainer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/25/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyUIVScrollBar.h"

+ 24 - 8
Modules/Contents/UI/Include/PolyUITextInput.h

@@ -1,21 +1,37 @@
 /*
- *  PolyUITextInput.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
-// @package UI
 
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyScreenLabel.h"
 #include "PolyScreenShape.h"
+#include "PolyFontManager.h"
 #include "PolyFont.h"
 #include "PolyScreenEntity.h"
 #include "PolyUIEvent.h"
 #include "PolyUIBox.h"
+#include "PolyTimer.h"
+#include "PolyCoreInput.h"
+#include "PolyCore.h"
 #include <vector>
 
 using namespace std;
@@ -37,7 +53,7 @@ namespace Polycode {
 			int insertLine(bool after);
 		
 			
-			void onKeyDown(TAUKey key, wchar_t charCode);
+			void onKeyDown(PolyKEY key, wchar_t charCode);
 		
 			void clearSelection();
 			void setSelection(int lineStart, int lineEnd, int colStart, int colEnd);

+ 20 - 8
Modules/Contents/UI/Include/PolyUITree.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUITree.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/28/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyScreenLabel.h"
@@ -17,6 +28,7 @@
 #include "PolyScreenEntity.h"
 #include "PolyUITreeEvent.h"
 #include "PolyUIBox.h"
+#include "PolyTween.h"
 #include <vector>
 
 using std::vector;

+ 19 - 8
Modules/Contents/UI/Include/PolyUITreeContainer.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUITreeContainer.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 #include "PolyGlobals.h"
 #include "PolyUITree.h"

+ 19 - 7
Modules/Contents/UI/Include/PolyUITreeEvent.h

@@ -1,12 +1,24 @@
 /*
- *  PolyUITreeEvent.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/29/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
-// @package UI
 
 #pragma once
 

+ 19 - 6
Modules/Contents/UI/Include/PolyUIVScrollBar.h

@@ -1,10 +1,23 @@
 /*
- *  PolyUIVScrollBar.h
- *  Poly
- *
- *  Created by Ivan Safrin on 3/25/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #pragma once

+ 21 - 9
Modules/Contents/UI/Include/PolyUIWindow.h

@@ -1,14 +1,25 @@
 /*
- *  PolyUIWindow.h
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-// @package UI
-
 #pragma once
 
 #include "PolyGlobals.h"
@@ -20,6 +31,7 @@
 #include "PolyFont.h"
 #include "PolyScreenEvent.h"
 #include "PolyUIBox.h"
+#include "PolyTween.h"
 
 namespace Polycode {
 
@@ -30,7 +42,7 @@ namespace Polycode {
 			
 			void showWindow();
 			void hideWindow();
-			void onKeyDown(TAUKey key, wchar_t charCode);
+			void onKeyDown(PolyKEY key, wchar_t charCode);
 			virtual void onClose(){}
 			void onLoseFocus();
 			

+ 19 - 8
Modules/Contents/UI/Include/PolycodeUI.h

@@ -1,14 +1,25 @@
 /*
- *  PolycodeUI.h
- *  
- *
- *  Created by Ivan Safrin on 11/29/10.
- *  Copyright 2010 Local Projects. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
-
-
 #include "PolyUIBox.h"
 #include "PolyUIButton.h"
 #include "PolyUICheckBox.h"

+ 19 - 6
Modules/Contents/UI/Source/PolyUIBox.cpp

@@ -1,10 +1,23 @@
 /*
- *  PolyUIBox.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/16/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #include "PolyUIBox.h"

+ 24 - 7
Modules/Contents/UI/Source/PolyUIButton.cpp

@@ -1,14 +1,31 @@
 /*
- *  PolyUIButton.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 8/1/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUIButton.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 
@@ -44,7 +61,7 @@ UIButton::UIButton(String text, Number width, Number height) : ScreenEntity() {
 	buttonRect->addEventListener(this, InputEvent::EVENT_MOUSEDOWN);
 	pressedDown = false;
 	
-	buttonLabel = new ScreenLabel(fontName, text, fontSize, Label::ANTIALIAS_FULL);
+	buttonLabel = new ScreenLabel(text, fontSize, fontName, Label::ANTIALIAS_FULL);
 	addChild(buttonLabel);
 	labelXPos = floor((width-buttonLabel->getWidth())/2.0f);
 	labelYPos = floor((height-(buttonLabel->getHeight()-5))/2.0f);

+ 23 - 8
Modules/Contents/UI/Source/PolyUICheckBox.cpp

@@ -1,23 +1,38 @@
 /*
- *  PolyUICheckBox.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 8/8/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #include "PolyUICheckBox.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
 
 using namespace Polycode;
 
-UICheckBox::UICheckBox(Font *font, String checkImage, String caption, bool checked) {
+UICheckBox::UICheckBox(Font *font, String checkImage, String caption, bool checked) : ScreenEntity() {
 	buttonImage = new ScreenImage(checkImage.c_str());
 	buttonImage->setPosition(2, 3);
 	this->checked = checked;
 	buttonImage->visible = checked;
 	
-	captionLabel = new ScreenLabel("", caption, 11, Label::ANTIALIAS_FULL);
+	captionLabel = new ScreenLabel(caption, 11, "", Label::ANTIALIAS_FULL);
 	addChild(captionLabel);
 	captionLabel->setPosition(buttonImage->getWidth()+14,0);
 	

+ 19 - 6
Modules/Contents/UI/Source/PolyUIEvent.cpp

@@ -1,10 +1,23 @@
 /*
- *  PolyUIEvent.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 

+ 23 - 6
Modules/Contents/UI/Source/PolyUIHScrollBar.cpp

@@ -1,14 +1,31 @@
 /*
- *  PolyUIHScrollBar.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/26/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUIHScrollBar.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 

+ 21 - 8
Modules/Contents/UI/Source/PolyUIHSlider.cpp

@@ -1,10 +1,23 @@
 /*
- *  PolyUIHSlider.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 8/7/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
@@ -58,8 +71,8 @@ ScreenShape *UIHSlider::getBgRect() {
 
 void UIHSlider::setSliderValue(Number val) {
 	if(val >= startValue && val <= endValue) {
-		gripRect->getPosition().x = sliderWidth * ((val-startValue)/(endValue-startValue));
-		shadowRect->getPosition().x = gripRect->getPosition().x;
+		gripRect->setPositionX(sliderWidth * ((val-startValue)/(endValue-startValue)));
+		shadowRect->setPositionX(gripRect->getPosition().x);
 	}
 }
 

+ 23 - 6
Modules/Contents/UI/Source/PolyUIImageButton.cpp

@@ -1,13 +1,30 @@
 /*
- *  PolyUIImageButton.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/29/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #include "PolyUIImageButton.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 

+ 23 - 6
Modules/Contents/UI/Source/PolyUIScrollContainer.cpp

@@ -1,13 +1,30 @@
 /*
- *  PolyUIScrollContainer.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/25/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #include "PolyUIScrollContainer.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 

+ 27 - 9
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -1,14 +1,32 @@
 /*
- *  PolyUITextInput.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUITextInput.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
+#include "PolyEventHandler.h"
 
 using namespace Polycode;
 
@@ -265,7 +283,7 @@ int UITextInput::insertLine(bool after) {
 	
 	numLines++;	
 	
-	ScreenLabel *newLine = new ScreenLabel(fontName, L"", fontSize, Label::ANTIALIAS_FULL);
+	ScreenLabel *newLine = new ScreenLabel(L"", fontSize, fontName, Label::ANTIALIAS_FULL);
 	newLine->setColor(0,0,0,1);
 	lineHeight = newLine->getHeight();
 	addChild(newLine);
@@ -494,7 +512,7 @@ void UITextInput::insertText(String text) {
 			lines[i]->setText(strings[i]);
 		} else {
 			numLines++;		
-			ScreenLabel *newLine = new ScreenLabel(fontName, L"", fontSize, Label::ANTIALIAS_FULL);
+			ScreenLabel *newLine = new ScreenLabel(L"", fontSize, fontName, Label::ANTIALIAS_FULL);
 			newLine->setColor(0,0,0,1);
 			addChild(newLine);			
 			lines.push_back(newLine);
@@ -526,7 +544,7 @@ String UITextInput::getSelectionText() {
 	return totalText;
 }
 
-void UITextInput::onKeyDown(TAUKey key, wchar_t charCode) {
+void UITextInput::onKeyDown(PolyKEY key, wchar_t charCode) {
 	
 	if(!hasFocus)
 		return;

+ 25 - 7
Modules/Contents/UI/Source/PolyUITree.cpp

@@ -1,14 +1,31 @@
 /*
- *  PolyUITree.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/28/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUITree.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 
@@ -27,9 +44,10 @@ UITree::UITree(String icon, String text, Number treeWidth, Number treeOffset) :
 	cellHeight = conf->getNumericValue("Polycode", "uiTreeCellHeight");
 	this->size = conf->getNumericValue("Polycode", "uiDefaultFontSize");
 	this->arrowIcon = conf->getStringValue("Polycode", "uiTreeArrowIconImage");	
-	textLabel = new ScreenLabel(fontName,
+	textLabel = new ScreenLabel(
 								text,
 								size,
+								fontName,
 								Label::ANTIALIAS_FULL);
 
 /*	

+ 23 - 6
Modules/Contents/UI/Source/PolyUITreeContainer.cpp

@@ -1,13 +1,30 @@
 /*
- *  PolyUITreeContainer.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/18/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 #include "PolyUITreeContainer.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 

+ 19 - 6
Modules/Contents/UI/Source/PolyUITreeEvent.cpp

@@ -1,10 +1,23 @@
 /*
- *  PolyUITreeEvent.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/29/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 

+ 23 - 6
Modules/Contents/UI/Source/PolyUIVScrollBar.cpp

@@ -1,14 +1,31 @@
 /*
- *  PolyUIVScrollBar.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 3/25/10.
- *  Copyright 2010 Ivan Safrin. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUIVScrollBar.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 

+ 25 - 8
Modules/Contents/UI/Source/PolyUIWindow.cpp

@@ -1,14 +1,31 @@
 /*
- *  PolyUIWindow.cpp
- *  Poly
- *
- *  Created by Ivan Safrin on 7/30/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
+ Copyright (C) 2012 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
  */
 
 
 #include "PolyUIWindow.h"
+#include "PolyConfig.h"
+#include "PolyInputEvent.h"
+#include "PolyLabel.h"
+#include "PolyCoreServices.h"
 
 using namespace Polycode;
 
@@ -44,7 +61,7 @@ UIWindow::UIWindow(String windowName, Number width, Number height) : ScreenEntit
 	titlebarRect->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
 	addChild(titlebarRect);
 	
-	ScreenLabel *titleLabel = new ScreenLabel(fontName, windowName, fontSize, Label::ANTIALIAS_FULL);
+	ScreenLabel *titleLabel = new ScreenLabel(windowName, fontSize, fontName, Label::ANTIALIAS_FULL);
 	titleLabel->setPosition(conf->getNumericValue("Polycode", "uiWindowTitleX"),conf->getNumericValue("Polycode", "uiWindowTitleY"));
 	addChild(titleLabel);
 	
@@ -76,7 +93,7 @@ UIWindow::~UIWindow() {
 
 }
 
-void UIWindow::onKeyDown(TAUKey key, wchar_t charCode) {
+void UIWindow::onKeyDown(PolyKEY key, wchar_t charCode) {
 	
 	if(key == KEY_TAB) {
 		if(hasFocus) {

Некоторые файлы не были показаны из-за большого количества измененных файлов