Browse Source

Fixed bindings, tweaked UI, added new UI theme to default themes, fixed IDE network stuff

Ivan Safrin 12 years ago
parent
commit
04fc32a398
93 changed files with 616 additions and 96 deletions
  1. BIN
      Assets/Default asset pack/default.pak
  2. BIN
      Assets/UIThemes.pak
  3. BIN
      Assets/UIThemes/dark_theme/arrowIcon.png
  4. BIN
      Assets/UIThemes/dark_theme/boxIcon.png
  5. BIN
      Assets/UIThemes/dark_theme/button.png
  6. BIN
      Assets/UIThemes/dark_theme/buttonFocused.png
  7. BIN
      Assets/UIThemes/dark_theme/checkbox_checked.png
  8. BIN
      Assets/UIThemes/dark_theme/checkbox_unchecked.png
  9. BIN
      Assets/UIThemes/dark_theme/closeIcon.png
  10. BIN
      Assets/UIThemes/dark_theme/colorPickerHue.png
  11. BIN
      Assets/UIThemes/dark_theme/colorPickerHueSelector.png
  12. BIN
      Assets/UIThemes/dark_theme/colorPickerMainBg.png
  13. BIN
      Assets/UIThemes/dark_theme/colorPickerMainFrame.png
  14. BIN
      Assets/UIThemes/dark_theme/colorPickerTarget.png
  15. BIN
      Assets/UIThemes/dark_theme/colorboxBg.png
  16. BIN
      Assets/UIThemes/dark_theme/colorboxFrame.png
  17. BIN
      Assets/UIThemes/dark_theme/combobox_bg.png
  18. BIN
      Assets/UIThemes/dark_theme/combobox_drop.png
  19. BIN
      Assets/UIThemes/dark_theme/file.png
  20. BIN
      Assets/UIThemes/dark_theme/folder.png
  21. BIN
      Assets/UIThemes/dark_theme/hsliderBg.png
  22. BIN
      Assets/UIThemes/dark_theme/hsliderHandle.png
  23. BIN
      Assets/UIThemes/dark_theme/menu_bg.png
  24. BIN
      Assets/UIThemes/dark_theme/menu_selector.png
  25. BIN
      Assets/UIThemes/dark_theme/projectIcon.png
  26. BIN
      Assets/UIThemes/dark_theme/scrollBg.png
  27. BIN
      Assets/UIThemes/dark_theme/scrollHandle.png
  28. BIN
      Assets/UIThemes/dark_theme/selector.png
  29. BIN
      Assets/UIThemes/dark_theme/templateIcon.png
  30. BIN
      Assets/UIThemes/dark_theme/textfield.png
  31. BIN
      Assets/UIThemes/dark_theme/textfield_multi.png
  32. 164 0
      Assets/UIThemes/dark_theme/theme.xml
  33. BIN
      Assets/UIThemes/dark_theme/treeBg.png
  34. BIN
      Assets/UIThemes/dark_theme/treeCellBg.png
  35. BIN
      Assets/UIThemes/dark_theme/windowBg.png
  36. BIN
      Assets/UIThemes/default_theme/arrowIcon.png
  37. BIN
      Assets/UIThemes/default_theme/boxIcon.png
  38. BIN
      Assets/UIThemes/default_theme/button.png
  39. BIN
      Assets/UIThemes/default_theme/buttonFocused.png
  40. BIN
      Assets/UIThemes/default_theme/checkbox_checked.png
  41. BIN
      Assets/UIThemes/default_theme/checkbox_unchecked.png
  42. BIN
      Assets/UIThemes/default_theme/closeIcon.png
  43. BIN
      Assets/UIThemes/default_theme/colorPickerHue.png
  44. BIN
      Assets/UIThemes/default_theme/colorPickerHueSelector.png
  45. BIN
      Assets/UIThemes/default_theme/colorPickerMainBg.png
  46. BIN
      Assets/UIThemes/default_theme/colorPickerMainFrame.png
  47. BIN
      Assets/UIThemes/default_theme/colorPickerTarget.png
  48. BIN
      Assets/UIThemes/default_theme/colorboxBg.png
  49. BIN
      Assets/UIThemes/default_theme/colorboxFrame.png
  50. BIN
      Assets/UIThemes/default_theme/combobox_bg.png
  51. BIN
      Assets/UIThemes/default_theme/combobox_drop.png
  52. BIN
      Assets/UIThemes/default_theme/file.png
  53. BIN
      Assets/UIThemes/default_theme/folder.png
  54. BIN
      Assets/UIThemes/default_theme/hsliderBg.png
  55. BIN
      Assets/UIThemes/default_theme/hsliderHandle.png
  56. BIN
      Assets/UIThemes/default_theme/menu_bg.png
  57. BIN
      Assets/UIThemes/default_theme/menu_selector.png
  58. BIN
      Assets/UIThemes/default_theme/projectIcon.png
  59. BIN
      Assets/UIThemes/default_theme/scrollBg.png
  60. BIN
      Assets/UIThemes/default_theme/scrollHandle.png
  61. BIN
      Assets/UIThemes/default_theme/selector.png
  62. BIN
      Assets/UIThemes/default_theme/templateIcon.png
  63. BIN
      Assets/UIThemes/default_theme/textfield.png
  64. BIN
      Assets/UIThemes/default_theme/textfield_multi.png
  65. 165 0
      Assets/UIThemes/default_theme/theme.xml
  66. BIN
      Assets/UIThemes/default_theme/treeBg.png
  67. BIN
      Assets/UIThemes/default_theme/treeCellBg.png
  68. BIN
      Assets/UIThemes/default_theme/windowBg.png
  69. 0 3
      Bindings/Contents/LUA/API/defaults.lua
  70. 2 2
      Bindings/Scripts/create_lua_library/create_lua_library.py
  71. 1 0
      Core/Contents/Include/PolyBezierCurve.h
  72. 0 2
      Core/Contents/Include/PolyEntity.h
  73. 0 1
      Core/Contents/Include/PolyParticle.h
  74. 0 2
      Core/Contents/Include/PolyParticleEmitter.h
  75. 1 0
      Core/Contents/Include/PolyRay.h
  76. 7 5
      Core/Contents/Include/PolyScene.h
  77. 3 2
      Core/Contents/Include/PolySceneLabel.h
  78. 8 6
      Core/Contents/Include/PolySceneLine.h
  79. 3 0
      Core/Contents/Include/PolySound.h
  80. 1 5
      Core/Contents/Source/PolyParticle.cpp
  81. 5 0
      Core/Contents/Source/PolyParticleEmitter.cpp
  82. 9 0
      Core/Contents/Source/PolyRay.cpp
  83. 1 0
      Core/Contents/Source/PolyScene.cpp
  84. 1 1
      Core/Contents/Source/PolySceneManager.cpp
  85. 5 0
      Core/Contents/Source/PolyServer.cpp
  86. 13 2
      Core/Contents/Source/PolySound.cpp
  87. 40 4
      IDE/Contents/Include/PolycodeFrame.h
  88. BIN
      IDE/Contents/Resources/Images/new_tab_button.png
  89. BIN
      IDE/Contents/Resources/Images/tab_bg.png
  90. 1 0
      IDE/Contents/Resources/UIThemes/dark/theme.xml
  91. 144 7
      IDE/Contents/Source/PolycodeFrame.cpp
  92. 0 1
      IDE/Contents/Source/PolycodeIDEApp.cpp
  93. 42 53
      IDE/Contents/Source/PolycodeRemoteDebugger.cpp

BIN
Assets/Default asset pack/default.pak


BIN
Assets/UIThemes.pak


BIN
Assets/UIThemes/dark_theme/arrowIcon.png


BIN
Assets/UIThemes/dark_theme/boxIcon.png


BIN
Assets/UIThemes/dark_theme/button.png


BIN
Assets/UIThemes/dark_theme/buttonFocused.png


BIN
Assets/UIThemes/dark_theme/checkbox_checked.png


BIN
Assets/UIThemes/dark_theme/checkbox_unchecked.png


BIN
Assets/UIThemes/dark_theme/closeIcon.png


BIN
Assets/UIThemes/dark_theme/colorPickerHue.png


BIN
Assets/UIThemes/dark_theme/colorPickerHueSelector.png


BIN
Assets/UIThemes/dark_theme/colorPickerMainBg.png


BIN
Assets/UIThemes/dark_theme/colorPickerMainFrame.png


BIN
Assets/UIThemes/dark_theme/colorPickerTarget.png


BIN
Assets/UIThemes/dark_theme/colorboxBg.png


BIN
Assets/UIThemes/dark_theme/colorboxFrame.png


BIN
Assets/UIThemes/dark_theme/combobox_bg.png


BIN
Assets/UIThemes/dark_theme/combobox_drop.png


BIN
Assets/UIThemes/dark_theme/file.png


BIN
Assets/UIThemes/dark_theme/folder.png


BIN
Assets/UIThemes/dark_theme/hsliderBg.png


BIN
Assets/UIThemes/dark_theme/hsliderHandle.png


BIN
Assets/UIThemes/dark_theme/menu_bg.png


BIN
Assets/UIThemes/dark_theme/menu_selector.png


BIN
Assets/UIThemes/dark_theme/projectIcon.png


BIN
Assets/UIThemes/dark_theme/scrollBg.png


BIN
Assets/UIThemes/dark_theme/scrollHandle.png


BIN
Assets/UIThemes/dark_theme/selector.png


BIN
Assets/UIThemes/dark_theme/templateIcon.png


BIN
Assets/UIThemes/dark_theme/textfield.png


BIN
Assets/UIThemes/dark_theme/textfield_multi.png


+ 164 - 0
Assets/UIThemes/dark_theme/theme.xml

@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<PolyConfig>
+	<uiDefaultFontName>sans</uiDefaultFontName>
+	<uiDefaultFontColor>0xe4e0e3ab</uiDefaultFontColor>
+
+	<uiBgColor>0x322d2bff</uiBgColor>
+	<uiAccentColor>0x1f3234ff</uiAccentColor>
+	<uiHeaderBgColor>0x262120ff</uiHeaderBgColor>
+	<uiSmallHeaderBgColor>0x2b2624ff</uiSmallHeaderBgColor>
+	<uiHeaderFontColor>0xe4e3e0ad</uiHeaderFontColor>
+
+	<uiTextInputFontName>sans</uiTextInputFontName>
+	<uiTextInputFontNameMultiLine>mono</uiTextInputFontNameMultiLine>
+	<uiDefaultFontSize>12</uiDefaultFontSize>
+	<uiTextInputFontSize>12</uiTextInputFontSize>
+	<uiTextInputFontSizeMultiline>13</uiTextInputFontSizeMultiline>	
+	<uiTreeArrowIconImage>arrowIcon.png</uiTreeArrowIconImage>
+	<uiTreeCellHeight>20</uiTreeCellHeight>
+	<uiTreeCellPadding>4</uiTreeCellPadding>
+	
+	<textBgSkin>textfield.png</textBgSkin>
+	<textBgSkinMultiline>textfield_multi.png</textBgSkinMultiline>
+	<textBgSkinT>9</textBgSkinT>
+	<textBgSkinR>9</textBgSkinR>
+	<textBgSkinB>9</textBgSkinB>
+	<textBgSkinL>9</textBgSkinL>
+	<textBgSkinPadding>5</textBgSkinPadding>
+	<textEditLineSpacing>14</textEditLineSpacing>
+	
+	<uiTreeCellSkin>treeCellBg.png</uiTreeCellSkin>
+	<uiTreeCellSkinPadding>0</uiTreeCellSkinPadding>
+	<uiTreeCellSkinT>3</uiTreeCellSkinT>
+	<uiTreeCellSkinR>3</uiTreeCellSkinR>
+	<uiTreeCellSkinB>3</uiTreeCellSkinB>
+	<uiTreeCellSkinL>3</uiTreeCellSkinL>
+	<uiTreeFontColor>0xe4e0e3c8</uiTreeFontColor>
+	<uiTreeCellSelectorSkin>selector.png</uiTreeCellSelectorSkin>
+	<uiTreeCellSelectorSkinPadding>4</uiTreeCellSelectorSkinPadding>
+	<uiTreeCellSelectorSkinT>4</uiTreeCellSelectorSkinT>
+	<uiTreeCellSelectorSkinR>3</uiTreeCellSelectorSkinR>
+	<uiTreeCellSelectorSkinB>4</uiTreeCellSelectorSkinB>
+	<uiTreeCellSelectorSkinL>0</uiTreeCellSelectorSkinL>
+	
+	<uiTreeContainerSkin>treeBg.png</uiTreeContainerSkin>
+	<uiTreeContainerSkinPadding>0</uiTreeContainerSkinPadding>
+	<uiTreeContainerSkinT>2</uiTreeContainerSkinT>
+	<uiTreeContainerSkinR>2</uiTreeContainerSkinR>
+	<uiTreeContainerSkinB>2</uiTreeContainerSkinB>
+	<uiTreeContainerSkinL>2</uiTreeContainerSkinL>
+	
+	<uiScrollDefaultSize>19</uiScrollDefaultSize>	
+	<uiScrollPanePadding>0</uiScrollPanePadding>
+
+	<uiButtonSkin>button.png</uiButtonSkin>
+	<uiButtonFocusedSkin>buttonFocused.png</uiButtonFocusedSkin>
+	<uiButtonFontSize>12</uiButtonFontSize>	
+	<uiButtonFontColor>0xe4e0e3c8</uiButtonFontColor>
+	<uiButtonLabelOffsetX>0</uiButtonLabelOffsetX>
+	<uiButtonLabelOffsetY>4</uiButtonLabelOffsetY>	
+	<uiButtonSkinT>12</uiButtonSkinT>
+	<uiButtonSkinR>12</uiButtonSkinR>
+	<uiButtonSkinB>12</uiButtonSkinB>
+	<uiButtonSkinL>12</uiButtonSkinL>
+
+	<uiWindowSkin>windowBg.png</uiWindowSkin>
+	<uiWindowSkinT>24</uiWindowSkinT>
+	<uiWindowSkinR>17</uiWindowSkinR>
+	<uiWindowSkinB>17</uiWindowSkinB>
+	<uiWindowSkinL>17</uiWindowSkinL>
+	<uiWindowSkinPadding>15</uiWindowSkinPadding>		
+	<uiWindowTitleFont>sans</uiWindowTitleFont>
+	<uiWindowFontColor>0xe4e0e3c8</uiWindowFontColor>	
+	<uiWindowTitleFontSize>14</uiWindowTitleFontSize>
+	<uiWindowTitleX>15</uiWindowTitleX>	
+	<uiWindowTitleY>10</uiWindowTitleY>
+	<uiWindowTitleBarHeight>25</uiWindowTitleBarHeight>
+	<uiWindowTitleBarOffset>5</uiWindowTitleBarOffset>
+	<uiWindowCloseIcon>closeIcon.png</uiWindowCloseIcon>
+	<uiCloseIconX>11</uiCloseIconX>	
+	<uiCloseIconY>11</uiCloseIconY>		
+
+	<uiScrollBgSkin>scrollBg.png</uiScrollBgSkin>
+	<uiScrollBgSkinPadding>1</uiScrollBgSkinPadding>
+	<uiScrollBgSkinT>8</uiScrollBgSkinT>
+	<uiScrollBgSkinR>8</uiScrollBgSkinR>
+	<uiScrollBgSkinB>8</uiScrollBgSkinB>
+	<uiScrollBgSkinL>8</uiScrollBgSkinL>
+	
+	<uiScrollHandleSkin>scrollHandle.png</uiScrollHandleSkin>
+	<uiScrollHandleSkinT>6</uiScrollHandleSkinT>
+	<uiScrollHandleSkinR>6</uiScrollHandleSkinR>
+	<uiScrollHandleSkinB>6</uiScrollHandleSkinB>
+	<uiScrollHandleSkinL>6</uiScrollHandleSkinL>
+		
+	<uiScrollHandleMinSize>30</uiScrollHandleMinSize>	
+	<uiTreeContainerScrollBarOffset>27</uiTreeContainerScrollBarOffset>
+	
+	<uiCheckBoxFont>sans</uiCheckBoxFont>
+	<uiCheckBoxFontSize>12</uiCheckBoxFontSize>	
+	<uiCheckBoxCheckedImage>checkbox_checked.png</uiCheckBoxCheckedImage>
+	<uiCheckBoxUncheckedImage>checkbox_unchecked.png</uiCheckBoxUncheckedImage>
+	<uiCheckBoxLabelOffsetX>4</uiCheckBoxLabelOffsetX>
+	<uiCheckBoxLabelOffsetY>3</uiCheckBoxLabelOffsetY>
+		
+	<uiComboBoxFont>sans</uiComboBoxFont>
+	<uiComboBoxFontSize>12</uiComboBoxFontSize>
+	<uiComboBoxDropdownImage>combobox_drop.png</uiComboBoxDropdownImage>
+	<uiComboBoxBgImage>combobox_bg.png</uiComboBoxBgImage>
+	<uiComboBoxHeight>24</uiComboBoxHeight>
+	<uiComboBoxBgT>6</uiComboBoxBgT>
+	<uiComboBoxBgR>6</uiComboBoxBgR>
+	<uiComboBoxBgB>6</uiComboBoxBgB>
+	<uiComboBoxBgL>6</uiComboBoxBgL>
+	<uiComboBoxDropX>6</uiComboBoxDropX>
+	<uiComboBoxDropY>5</uiComboBoxDropY>
+	<uiComboBoxTextOffsetX>7</uiComboBoxTextOffsetX>
+	<uiComboBoxTextOffsetY>4</uiComboBoxTextOffsetY>		
+
+
+	<uiMenuFont>sans</uiMenuFont>
+	<uiMenuFontSize>12</uiMenuFontSize>
+	<uiMenuTextOffsetX>10</uiMenuTextOffsetX>
+	<uiMenuTextOffsetY>-1</uiMenuTextOffsetY>		
+	<uiMenuPaddingX>3</uiMenuPaddingX>
+	<uiMenuPaddingY>10</uiMenuPaddingY>
+	<uiMenuItemHeight>22</uiMenuItemHeight>
+	<uiMenuBgImage>menu_bg.png</uiMenuBgImage>	
+	<uiMenuBgT>4</uiMenuBgT>
+	<uiMenuBgR>6</uiMenuBgR>
+	<uiMenuBgB>9</uiMenuBgB>
+	<uiMenuBgL>6</uiMenuBgL>			
+	<uiMenuSelectorBgImage>menu_selector.png</uiMenuSelectorBgImage>	
+	<uiMenuSelectorBgT>0</uiMenuSelectorBgT>
+	<uiMenuSelectorBgR>0</uiMenuSelectorBgR>
+	<uiMenuSelectorBgB>0</uiMenuSelectorBgB>
+	<uiMenuSelectorBgL>0</uiMenuSelectorBgL>
+	<uiMenuSelectorPadding>3</uiMenuSelectorPadding>
+
+	<uiColorBoxFrameImage>colorboxFrame.png</uiColorBoxFrameImage>
+	<uiColorBoxFrameImageT>7</uiColorBoxFrameImageT>
+	<uiColorBoxFrameImageR>7</uiColorBoxFrameImageR>
+	<uiColorBoxFrameImageB>7</uiColorBoxFrameImageB>
+	<uiColorBoxFrameImageL>7</uiColorBoxFrameImageL>					
+	<uiColorBoxBgImage>colorboxBg.png</uiColorBoxBgImage>
+	<uiColorBoxFrameInset>4</uiColorBoxFrameInset>
+
+	<uiColorPickerMainBg>colorPickerMainBg.png</uiColorPickerMainBg>
+	<uiColorPickerMainFrame>colorPickerMainFrame.png</uiColorPickerMainFrame>
+	<uiColorPickerHueFrame>colorPickerHue.png</uiColorPickerHueFrame>
+	<uiColorPickerHueSelector>colorPickerHueSelector.png</uiColorPickerHueSelector>
+	<uiColorPickerMainSelector>colorPickerTarget.png</uiColorPickerMainSelector>
+
+	<uiHSliderGrip>hsliderHandle.png</uiHSliderGrip>
+	<uiHSliderBg>hsliderBg.png</uiHSliderBg>
+	<uiHSliderBgHeight>10</uiHSliderBgHeight>
+	<uiHSliderBgT>5</uiHSliderBgT>
+	<uiHSliderBgR>6</uiHSliderBgR>
+	<uiHSliderBgB>5</uiHSliderBgB>
+	<uiHSliderBgL>6</uiHSliderBgL>
+
+	<uiFileBrowserFileIcon>file.png</uiFileBrowserFileIcon>
+	<uiFileBrowserFolderIcon>folder.png</uiFileBrowserFolderIcon>
+	<uiFileBrowserPlaceIcon>boxIcon.png</uiFileBrowserPlaceIcon>
+</PolyConfig>

BIN
Assets/UIThemes/dark_theme/treeBg.png


BIN
Assets/UIThemes/dark_theme/treeCellBg.png


BIN
Assets/UIThemes/dark_theme/windowBg.png


BIN
Assets/UIThemes/default_theme/arrowIcon.png


BIN
Assets/UIThemes/default_theme/boxIcon.png


BIN
Assets/UIThemes/default_theme/button.png


BIN
Assets/UIThemes/default_theme/buttonFocused.png


BIN
Assets/UIThemes/default_theme/checkbox_checked.png


BIN
Assets/UIThemes/default_theme/checkbox_unchecked.png


BIN
Assets/UIThemes/default_theme/closeIcon.png


BIN
Assets/UIThemes/default_theme/colorPickerHue.png


BIN
Assets/UIThemes/default_theme/colorPickerHueSelector.png


BIN
Assets/UIThemes/default_theme/colorPickerMainBg.png


BIN
Assets/UIThemes/default_theme/colorPickerMainFrame.png


BIN
Assets/UIThemes/default_theme/colorPickerTarget.png


BIN
Assets/UIThemes/default_theme/colorboxBg.png


BIN
Assets/UIThemes/default_theme/colorboxFrame.png


BIN
Assets/UIThemes/default_theme/combobox_bg.png


BIN
Assets/UIThemes/default_theme/combobox_drop.png


BIN
Assets/UIThemes/default_theme/file.png


BIN
Assets/UIThemes/default_theme/folder.png


BIN
Assets/UIThemes/default_theme/hsliderBg.png


BIN
Assets/UIThemes/default_theme/hsliderHandle.png


BIN
Assets/UIThemes/default_theme/menu_bg.png


BIN
Assets/UIThemes/default_theme/menu_selector.png


BIN
Assets/UIThemes/default_theme/projectIcon.png


BIN
Assets/UIThemes/default_theme/scrollBg.png


BIN
Assets/UIThemes/default_theme/scrollHandle.png


BIN
Assets/UIThemes/default_theme/selector.png


BIN
Assets/UIThemes/default_theme/templateIcon.png


BIN
Assets/UIThemes/default_theme/textfield.png


BIN
Assets/UIThemes/default_theme/textfield_multi.png


+ 165 - 0
Assets/UIThemes/default_theme/theme.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0"?>
+<PolyConfig>
+	<uiDefaultFontName>sans</uiDefaultFontName>
+	<uiDefaultFontColor>0x000000c8</uiDefaultFontColor>
+
+	<uiBgColor>0xc8c8c8ff</uiBgColor>
+	<uiAccentColor>0x31687fff</uiAccentColor>	
+	<uiHeaderBgColor>0x616161ff</uiHeaderBgColor>
+	<uiSmallHeaderBgColor>0x868686ff</uiSmallHeaderBgColor>
+	<uiHeaderFontColor>0x000000c8</uiHeaderFontColor>
+	<uiSectionFontColor>0x00000080</uiSectionFontColor>
+
+	<uiTextInputFontName>sans</uiTextInputFontName>
+	<uiTextInputFontNameMultiLine>mono</uiTextInputFontNameMultiLine>
+	<uiDefaultFontSize>12</uiDefaultFontSize>
+	<uiTextInputFontSize>12</uiTextInputFontSize>
+	<uiTextInputFontSizeMultiline>13</uiTextInputFontSizeMultiline>	
+	<uiTreeArrowIconImage>UIThemes/default_theme/arrowIcon.png</uiTreeArrowIconImage>
+	<uiTreeCellHeight>20</uiTreeCellHeight>
+	<uiTreeCellPadding>4</uiTreeCellPadding>
+	
+	<textBgSkin>textfield.png</textBgSkin>
+	<textBgSkinMultiline>UIThemes/default_theme/textfield_multi.png</textBgSkinMultiline>
+	<textBgSkinT>9</textBgSkinT>
+	<textBgSkinR>9</textBgSkinR>
+	<textBgSkinB>9</textBgSkinB>
+	<textBgSkinL>9</textBgSkinL>
+	<textBgSkinPadding>5</textBgSkinPadding>
+	<textEditLineSpacing>14</textEditLineSpacing>
+	
+	<uiTreeCellSkin>UIThemes/default_theme/treeCellBg.png</uiTreeCellSkin>
+	<uiTreeCellSkinPadding>0</uiTreeCellSkinPadding>
+	<uiTreeCellSkinT>3</uiTreeCellSkinT>
+	<uiTreeCellSkinR>3</uiTreeCellSkinR>
+	<uiTreeCellSkinB>3</uiTreeCellSkinB>
+	<uiTreeCellSkinL>3</uiTreeCellSkinL>
+	<uiTreeFontColor>0x000000c8</uiTreeFontColor>
+	<uiTreeCellSelectorSkin>UIThemes/default_theme/selector.png</uiTreeCellSelectorSkin>
+	<uiTreeCellSelectorSkinPadding>4</uiTreeCellSelectorSkinPadding>
+	<uiTreeCellSelectorSkinT>4</uiTreeCellSelectorSkinT>
+	<uiTreeCellSelectorSkinR>3</uiTreeCellSelectorSkinR>
+	<uiTreeCellSelectorSkinB>4</uiTreeCellSelectorSkinB>
+	<uiTreeCellSelectorSkinL>0</uiTreeCellSelectorSkinL>
+	
+	<uiTreeContainerSkin>UIThemes/default_theme/treeBg.png</uiTreeContainerSkin>
+	<uiTreeContainerSkinPadding>0</uiTreeContainerSkinPadding>
+	<uiTreeContainerSkinT>2</uiTreeContainerSkinT>
+	<uiTreeContainerSkinR>2</uiTreeContainerSkinR>
+	<uiTreeContainerSkinB>2</uiTreeContainerSkinB>
+	<uiTreeContainerSkinL>2</uiTreeContainerSkinL>
+	
+	<uiScrollDefaultSize>19</uiScrollDefaultSize>	
+	<uiScrollPanePadding>0</uiScrollPanePadding>
+
+	<uiButtonSkin>UIThemes/default_theme/button.png</uiButtonSkin>
+	<uiButtonFocusedSkin>UIThemes/default_theme/buttonFocused.png</uiButtonFocusedSkin>
+	<uiButtonFontSize>12</uiButtonFontSize>	
+	<uiButtonFontColor>0xffffffff</uiButtonFontColor>
+	<uiButtonLabelOffsetX>0</uiButtonLabelOffsetX>
+	<uiButtonLabelOffsetY>4</uiButtonLabelOffsetY>	
+	<uiButtonSkinT>12</uiButtonSkinT>
+	<uiButtonSkinR>12</uiButtonSkinR>
+	<uiButtonSkinB>12</uiButtonSkinB>
+	<uiButtonSkinL>12</uiButtonSkinL>
+
+	<uiWindowSkin>UIThemes/default_theme/windowBg.png</uiWindowSkin>
+	<uiWindowSkinT>24</uiWindowSkinT>
+	<uiWindowSkinR>17</uiWindowSkinR>
+	<uiWindowSkinB>17</uiWindowSkinB>
+	<uiWindowSkinL>17</uiWindowSkinL>
+	<uiWindowSkinPadding>15</uiWindowSkinPadding>		
+	<uiWindowTitleFont>sans</uiWindowTitleFont>
+	<uiWindowFontColor>0x000000c8</uiWindowFontColor>	
+	<uiWindowTitleFontSize>14</uiWindowTitleFontSize>
+	<uiWindowTitleX>15</uiWindowTitleX>	
+	<uiWindowTitleY>10</uiWindowTitleY>
+	<uiWindowTitleBarHeight>25</uiWindowTitleBarHeight>
+	<uiWindowTitleBarOffset>5</uiWindowTitleBarOffset>
+	<uiWindowCloseIcon>UIThemes/default_theme/closeIcon.png</uiWindowCloseIcon>
+	<uiCloseIconX>11</uiCloseIconX>	
+	<uiCloseIconY>11</uiCloseIconY>		
+
+	<uiScrollBgSkin>UIThemes/default_theme/scrollBg.png</uiScrollBgSkin>
+	<uiScrollBgSkinPadding>1</uiScrollBgSkinPadding>
+	<uiScrollBgSkinT>8</uiScrollBgSkinT>
+	<uiScrollBgSkinR>8</uiScrollBgSkinR>
+	<uiScrollBgSkinB>8</uiScrollBgSkinB>
+	<uiScrollBgSkinL>8</uiScrollBgSkinL>
+	
+	<uiScrollHandleSkin>UIThemes/default_theme/scrollHandle.png</uiScrollHandleSkin>
+	<uiScrollHandleSkinT>6</uiScrollHandleSkinT>
+	<uiScrollHandleSkinR>6</uiScrollHandleSkinR>
+	<uiScrollHandleSkinB>6</uiScrollHandleSkinB>
+	<uiScrollHandleSkinL>6</uiScrollHandleSkinL>
+		
+	<uiScrollHandleMinSize>30</uiScrollHandleMinSize>	
+	<uiTreeContainerScrollBarOffset>27</uiTreeContainerScrollBarOffset>
+	
+	<uiCheckBoxFont>sans</uiCheckBoxFont>
+	<uiCheckBoxFontSize>12</uiCheckBoxFontSize>	
+	<uiCheckBoxCheckedImage>UIThemes/default_theme/checkbox_checked.png</uiCheckBoxCheckedImage>
+	<uiCheckBoxUncheckedImage>UIThemes/default_theme/checkbox_unchecked.png</uiCheckBoxUncheckedImage>
+	<uiCheckBoxLabelOffsetX>4</uiCheckBoxLabelOffsetX>
+	<uiCheckBoxLabelOffsetY>3</uiCheckBoxLabelOffsetY>
+		
+	<uiComboBoxFont>sans</uiComboBoxFont>
+	<uiComboBoxFontSize>12</uiComboBoxFontSize>
+	<uiComboBoxDropdownImage>UIThemes/default_theme/combobox_drop.png</uiComboBoxDropdownImage>
+	<uiComboBoxBgImage>UIThemes/default_theme/combobox_bg.png</uiComboBoxBgImage>
+	<uiComboBoxHeight>24</uiComboBoxHeight>
+	<uiComboBoxBgT>6</uiComboBoxBgT>
+	<uiComboBoxBgR>10</uiComboBoxBgR>
+	<uiComboBoxBgB>6</uiComboBoxBgB>
+	<uiComboBoxBgL>10</uiComboBoxBgL>
+	<uiComboBoxDropX>6</uiComboBoxDropX>
+	<uiComboBoxDropY>5</uiComboBoxDropY>
+	<uiComboBoxTextOffsetX>7</uiComboBoxTextOffsetX>
+	<uiComboBoxTextOffsetY>5</uiComboBoxTextOffsetY>		
+
+
+	<uiMenuFont>sans</uiMenuFont>
+	<uiMenuFontSize>12</uiMenuFontSize>
+	<uiMenuTextOffsetX>10</uiMenuTextOffsetX>
+	<uiMenuTextOffsetY>-1</uiMenuTextOffsetY>		
+	<uiMenuPaddingX>3</uiMenuPaddingX>
+	<uiMenuPaddingY>10</uiMenuPaddingY>
+	<uiMenuItemHeight>22</uiMenuItemHeight>
+	<uiMenuBgImage>UIThemes/default_theme/menu_bg.png</uiMenuBgImage>	
+	<uiMenuBgT>4</uiMenuBgT>
+	<uiMenuBgR>6</uiMenuBgR>
+	<uiMenuBgB>9</uiMenuBgB>
+	<uiMenuBgL>6</uiMenuBgL>			
+	<uiMenuSelectorBgImage>UIThemes/default_theme/menu_selector.png</uiMenuSelectorBgImage>	
+	<uiMenuSelectorBgT>0</uiMenuSelectorBgT>
+	<uiMenuSelectorBgR>0</uiMenuSelectorBgR>
+	<uiMenuSelectorBgB>0</uiMenuSelectorBgB>
+	<uiMenuSelectorBgL>0</uiMenuSelectorBgL>
+	<uiMenuSelectorPadding>3</uiMenuSelectorPadding>
+
+	<uiColorBoxFrameImage>UIThemes/default_theme/colorboxFrame.png</uiColorBoxFrameImage>
+	<uiColorBoxFrameImageT>10</uiColorBoxFrameImageT>
+	<uiColorBoxFrameImageR>10</uiColorBoxFrameImageR>
+	<uiColorBoxFrameImageB>10</uiColorBoxFrameImageB>
+	<uiColorBoxFrameImageL>10</uiColorBoxFrameImageL>					
+	<uiColorBoxBgImage>UIThemes/default_theme/colorboxBg.png</uiColorBoxBgImage>
+	<uiColorBoxFrameInset>4</uiColorBoxFrameInset>
+
+	<uiColorPickerMainBg>UIThemes/default_theme/colorPickerMainBg.png</uiColorPickerMainBg>
+	<uiColorPickerMainFrame>UIThemes/default_theme/colorPickerMainFrame.png</uiColorPickerMainFrame>
+	<uiColorPickerHueFrame>UIThemes/default_theme/colorPickerHue.png</uiColorPickerHueFrame>
+	<uiColorPickerHueSelector>UIThemes/default_theme/colorPickerHueSelector.png</uiColorPickerHueSelector>
+	<uiColorPickerMainSelector>UIThemes/default_theme/colorPickerTarget.png</uiColorPickerMainSelector>
+
+	<uiHSliderGrip>UIThemes/default_theme/hsliderHandle.png</uiHSliderGrip>
+	<uiHSliderBg>UIThemes/default_theme/hsliderBg.png</uiHSliderBg>
+	<uiHSliderBgHeight>10</uiHSliderBgHeight>
+	<uiHSliderBgT>5</uiHSliderBgT>
+	<uiHSliderBgR>6</uiHSliderBgR>
+	<uiHSliderBgB>5</uiHSliderBgB>
+	<uiHSliderBgL>6</uiHSliderBgL>
+
+	<uiFileBrowserFileIcon>UIThemes/default_theme/file.png</uiFileBrowserFileIcon>
+	<uiFileBrowserFolderIcon>UIThemes/default_theme/folder.png</uiFileBrowserFolderIcon>
+	<uiFileBrowserPlaceIcon>UIThemes/default_theme/boxIcon.png</uiFileBrowserPlaceIcon>
+</PolyConfig>

BIN
Assets/UIThemes/default_theme/treeBg.png


BIN
Assets/UIThemes/default_theme/treeCellBg.png


BIN
Assets/UIThemes/default_theme/windowBg.png


+ 0 - 3
Bindings/Contents/LUA/API/defaults.lua

@@ -69,9 +69,6 @@ Services.Config.__ptr = Polycore.CoreServices_getConfig(Polycore.CoreServices_ge
 Services.MaterialManager = MaterialManager("__skip_ptr__")
 Services.MaterialManager = MaterialManager("__skip_ptr__")
 Services.MaterialManager.__ptr = Polycore.CoreServices_getMaterialManager(Polycore.CoreServices_getInstance())
 Services.MaterialManager.__ptr = Polycore.CoreServices_getMaterialManager(Polycore.CoreServices_getInstance())
 
 
-Services.ScreenManager = ScreenManager("__skip_ptr__")
-Services.ScreenManager.__ptr = Polycore.CoreServices_getScreenManager(Polycore.CoreServices_getInstance())
-
 Services.SceneManager = SceneManager("__skip_ptr__")
 Services.SceneManager = SceneManager("__skip_ptr__")
 Services.SceneManager.__ptr = Polycore.CoreServices_getSceneManager(Polycore.CoreServices_getInstance())
 Services.SceneManager.__ptr = Polycore.CoreServices_getSceneManager(Polycore.CoreServices_getInstance())
 
 

+ 2 - 2
Bindings/Scripts/create_lua_library/create_lua_library.py

@@ -122,7 +122,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 
 
 	# list of classes that don't get the garbage collection in their meta table
 	# list of classes that don't get the garbage collection in their meta table
 
 
-	disable_gc = ["Entity", "ScreenEntity", "ScreenShape", "ScreenMesh", "ScreenLine", "ScreenLabel", "SceneLabel", "SceneMesh", "Screen", "Scene", "Texture", "Image", "Camera", "ScreenParticleEmitter", "SceneParticleEmitter", "Mesh", "Vertex", "Polygon", "Polycode::Polygon", "Material", "ScenePrimitive", "SceneLine", "SceneLight", "SceneSound", "ScreenImage", "SceneEntity", "ScreenEntityInstance"]
+	disable_gc = ["Entity","SceneLabel", "SceneMesh", "Scene", "Texture", "Image", "Camera", "SceneParticleEmitter", "Mesh", "Vertex", "Polygon", "Polycode::Polygon", "Material", "ScenePrimitive", "SceneLine", "SceneLight", "SceneSound", "SceneImage", "SceneEntity", "SceneEntityInstance", "SceneSprite"]
 
 
 	# Special case: If we are building the Polycode library itself, inject the LuaEventHandler class.
 	# Special case: If we are building the Polycode library itself, inject the LuaEventHandler class.
 	# Note: so that event callbacks can work, any object inheriting from EventHandler will secretly
 	# Note: so that event callbacks can work, any object inheriting from EventHandler will secretly
@@ -148,7 +148,7 @@ def createLUABindings(inputPath, prefix, mainInclude, libSmallName, libName, api
 	# Iterate, process each input file
 	# Iterate, process each input file
 	for fileName in filteredFiles:
 	for fileName in filteredFiles:
 		# "Package owned" classes that ship with Polycode
 		# "Package owned" classes that ship with Polycode
-		inheritInModule = ["PhysicsSceneEntity", "CollisionScene", "CollisionSceneEntity", "UIElement", "UIWindow", "UIMenuItem"]
+		inheritInModule = ["PhysicsEntity", "CollisionScene", "CollisionEntity", "UIElement", "UIWindow", "UIMenuItem"]
 		
 		
 		# A file or comma-separated list of files can be given to specify classes which are "package owned"
 		# A file or comma-separated list of files can be given to specify classes which are "package owned"
 		# and should not be inherited out of Polycode/. The files should contain one class name per line,
 		# and should not be inherited out of Polycode/. The files should contain one class name per line,

+ 1 - 0
Core/Contents/Include/PolyBezierCurve.h

@@ -19,6 +19,7 @@
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
  THE SOFTWARE.
  */
  */
+ 
 
 
 
 
 #pragma once 
 #pragma once 

+ 0 - 2
Core/Contents/Include/PolyEntity.h

@@ -650,8 +650,6 @@ namespace Polycode {
 			
 			
 			Entity *getEntityById(String id, bool recursive) const;
 			Entity *getEntityById(String id, bool recursive) const;
 			std::vector<Entity*> getEntitiesByTag(String tag, bool recursive) const;
 			std::vector<Entity*> getEntitiesByTag(String tag, bool recursive) const;
-						
-			Vector3 getChildCenter() const;
 			
 			
 			std::vector <EntityProp> entityProps;
 			std::vector <EntityProp> entityProps;
 			String getEntityProp(const String& propName);
 			String getEntityProp(const String& propName);

+ 0 - 1
Core/Contents/Include/PolyParticle.h

@@ -38,7 +38,6 @@ namespace Polycode {
 			void Reset(bool continuious);
 			void Reset(bool continuious);
 			
 			
 			void createSceneParticle(int particleType, Material *material, Mesh *particleMesh);
 			void createSceneParticle(int particleType, Material *material, Mesh *particleMesh);
-			void createScreenParticle(int particleType, Texture *texture, Mesh *particleMesh);
 		
 		
 			Entity *particleBody;						
 			Entity *particleBody;						
 			
 			

+ 0 - 2
Core/Contents/Include/PolyParticleEmitter.h

@@ -228,8 +228,6 @@ namespace Polycode {
 			Number particleSize;
 			Number particleSize;
 			
 			
 			Texture *getParticleTexture() const;
 			Texture *getParticleTexture() const;
-			
-			void setParticleTexture(Texture *texture);
 		
 		
 			Vector3 emitterRadius;
 			Vector3 emitterRadius;
 					
 					

+ 1 - 0
Core/Contents/Include/PolyRay.h

@@ -32,6 +32,7 @@ namespace Polycode {
 	*/
 	*/
 	class _PolyExport Ray : public PolyBase {
 	class _PolyExport Ray : public PolyBase {
 		public:
 		public:
+			Ray();
 			Ray(const Vector3 &origin, const Vector3 &direction);
 			Ray(const Vector3 &origin, const Vector3 &direction);
 	
 	
 			bool boxIntersect(const Vector3 &box, const Matrix4 &transformMatrix, float near = 0.0, float far = 9999.0) const;			
 			bool boxIntersect(const Vector3 &box, const Matrix4 &transformMatrix, float near = 0.0, float far = 9999.0) const;			

+ 7 - 5
Core/Contents/Include/PolyScene.h

@@ -45,17 +45,19 @@ namespace Polycode {
 	*/ 
 	*/ 
 	class _PolyExport Scene : public EventDispatcher {
 	class _PolyExport Scene : public EventDispatcher {
 	public:
 	public:
-		
-		/**
-		* Default constructor. Defaults to type Scene::SCENE_3D
-		*/
-		Scene();
+
 		/**
 		/**
 		* Default constructor with options. 
 		* Default constructor with options. 
 		* @param sceneType Type of scene to create. Can be Scene::SCENE_2D, Scene::SCENE_3D or Scene::SCENE_2D_TOPLEFT
 		* @param sceneType Type of scene to create. Can be Scene::SCENE_2D, Scene::SCENE_3D or Scene::SCENE_2D_TOPLEFT
 		* @param virtualScene If this flag is set to true, the scene is not rendered to the screen. Use this if you want to render the scene only to a texture.
 		* @param virtualScene If this flag is set to true, the scene is not rendered to the screen. Use this if you want to render the scene only to a texture.
 		*/		
 		*/		
 		Scene(int sceneType, bool virtualScene = false);
 		Scene(int sceneType, bool virtualScene = false);
+				
+		/**
+		* Default constructor. Defaults to type Scene::SCENE_3D
+		*/
+		Scene();
+
 		virtual ~Scene();
 		virtual ~Scene();
 		
 		
 		/**
 		/**

+ 3 - 2
Core/Contents/Include/PolySceneLabel.h

@@ -38,6 +38,9 @@ namespace Polycode {
 	class _PolyExport SceneLabel : public ScenePrimitive {
 	class _PolyExport SceneLabel : public ScenePrimitive {
 		public:
 		public:
 			
 			
+			
+			SceneLabel(const String& text, int size, const String& fontName = "sans", int amode = 0, bool premultiplyAlpha = false);
+			
 			/**
 			/**
 			* Constructor.
 			* Constructor.
 			* @param fontName Name of a registered font to use. @see FontManager for info on how to register fonts.
 			* @param fontName Name of a registered font to use. @see FontManager for info on how to register fonts.
@@ -48,8 +51,6 @@ namespace Polycode {
 			*/			
 			*/			
 			SceneLabel(const String& fontName, const String& text, int size, Number scale, int amode, bool premultiplyAlpha = false);
 			SceneLabel(const String& fontName, const String& text, int size, Number scale, int amode, bool premultiplyAlpha = false);
 			
 			
-			SceneLabel(const String& text, int size, const String& fontName = "sans", int amode = 0, bool premultiplyAlpha = false);
-
 			String getText();
 			String getText();
 			
 			
 			void Render();
 			void Render();

+ 8 - 6
Core/Contents/Include/PolySceneLine.h

@@ -34,6 +34,14 @@ namespace Polycode {
 	*/ 
 	*/ 
 	class _PolyExport SceneLine : public SceneMesh {
 	class _PolyExport SceneLine : public SceneMesh {
 		public:
 		public:
+		
+			/**
+			* Constructs the line with two taraget positions.
+			* @param start Starting position.
+			* @param end Ending position.
+			*/			
+			SceneLine(Vector3 start, Vector3 end);
+		
 			/**
 			/**
 			* Constructs the line with two taraget entities.
 			* Constructs the line with two taraget entities.
 			* @param ent1 Starting entity.
 			* @param ent1 Starting entity.
@@ -41,12 +49,6 @@ namespace Polycode {
 			*/
 			*/
 			SceneLine(Entity *ent1, Entity *ent2);
 			SceneLine(Entity *ent1, Entity *ent2);
 			
 			
-			/**
-			* Constructs the line with two taraget positions.
-			* @param start Starting position.
-			* @param end Ending position.
-			*/			
-			SceneLine(Vector3 start, Vector3 end);
 
 
 			/**
 			/**
 			* Constructs the line with two taraget positions.
 			* Constructs the line with two taraget positions.

+ 3 - 0
Core/Contents/Include/PolySound.h

@@ -149,6 +149,8 @@ namespace Polycode {
 		void soundCheck(bool result, const String& err);
 		void soundCheck(bool result, const String& err);
 		static unsigned long readByte32(const unsigned char buffer[4]);		
 		static unsigned long readByte32(const unsigned char buffer[4]);		
 		static unsigned short readByte16(const unsigned char buffer[2]);
 		static unsigned short readByte16(const unsigned char buffer[2]);
+		
+//		std::vector<Number> *getFloatBuffer();
 
 
 	protected:
 	protected:
 	
 	
@@ -167,5 +169,6 @@ namespace Polycode {
 		ALuint soundSource;
 		ALuint soundSource;
 		int sampleLength;
 		int sampleLength;
 		
 		
+//		std::vector<Number> floatBuffer;
 	};
 	};
 }
 }

+ 1 - 5
Core/Contents/Source/PolyParticle.cpp

@@ -31,11 +31,7 @@ Mesh *Particle::billboardMesh = 0;
 
 
 Particle::Particle(int particleType, bool isScreenParticle, Material *material, Texture *texture, Mesh *particleMesh) {
 Particle::Particle(int particleType, bool isScreenParticle, Material *material, Texture *texture, Mesh *particleMesh) {
 	life = 0;
 	life = 0;
-	if(isScreenParticle) {
-		createScreenParticle(particleType, texture, particleMesh);		
-	} else {
-		createSceneParticle(particleType, material, particleMesh);
-	}
+	createSceneParticle(particleType, material, particleMesh);
 	
 	
 	Reset(true);
 	Reset(true);
 }
 }

+ 5 - 0
Core/Contents/Source/PolyParticleEmitter.cpp

@@ -356,6 +356,11 @@ void ParticleEmitter::resetParticle(Particle *particle) {
 			
 			
 }
 }
 
 
+Vector3 SceneParticleEmitter::getParticleCompoundScale() {
+	return getCompoundScale();
+}
+
+
 Vector3 ParticleEmitter::getParticleCompoundScale() {
 Vector3 ParticleEmitter::getParticleCompoundScale() {
 	return Vector3();
 	return Vector3();
 }
 }

+ 9 - 0
Core/Contents/Source/PolyRay.cpp

@@ -25,6 +25,15 @@
 
 
 using namespace Polycode;
 using namespace Polycode;
 
 
+Ray::Ray() {
+	inv_direction = Vector3(1.0/direction.x, 1.0/direction.y, 1.0/direction.z);
+	sign[0] = (inv_direction.x < 0);
+	sign[1] = (inv_direction.y < 0);
+	sign[2] = (inv_direction.z < 0);
+	this->origin = origin;
+	this->direction = direction;
+}
+
 Ray::Ray(const Vector3 &origin, const Vector3 &direction) {
 Ray::Ray(const Vector3 &origin, const Vector3 &direction) {
 	inv_direction = Vector3(1.0/direction.x, 1.0/direction.y, 1.0/direction.z);
 	inv_direction = Vector3(1.0/direction.x, 1.0/direction.y, 1.0/direction.z);
 	sign[0] = (inv_direction.x < 0);
 	sign[0] = (inv_direction.x < 0);

+ 1 - 0
Core/Contents/Source/PolyScene.cpp

@@ -124,6 +124,7 @@ void Scene::Update() {
 }
 }
 
 
 Scene::~Scene() {
 Scene::~Scene() {
+	core->getInput()->removeAllHandlersForListener(this);
 	CoreServices::getInstance()->getSceneManager()->removeScene(this);	
 	CoreServices::getInstance()->getSceneManager()->removeScene(this);	
 	delete defaultCamera;
 	delete defaultCamera;
 }
 }

+ 1 - 1
Core/Contents/Source/PolySceneManager.cpp

@@ -46,7 +46,7 @@ void SceneManager::removeScene(Scene *scene) {
 	for(int i=0;i<scenes.size();i++) {
 	for(int i=0;i<scenes.size();i++) {
 		if(scenes[i] == scene) {
 		if(scenes[i] == scene) {
 			scenes.erase(scenes.begin()+i);
 			scenes.erase(scenes.begin()+i);
-//			delete scene;
+			return;
 		}
 		}
 	}
 	}
 }
 }

+ 5 - 0
Core/Contents/Source/PolyServer.cpp

@@ -78,6 +78,11 @@ void Server::handleEvent(Event *event) {
 				world->getWorldState(client, &worldData, &worldDataSize);			
 				world->getWorldState(client, &worldData, &worldDataSize);			
 				sendData(client->connection->address, (char*)worldData, worldDataSize, PACKET_TYPE_SERVER_DATA);			
 				sendData(client->connection->address, (char*)worldData, worldDataSize, PACKET_TYPE_SERVER_DATA);			
 			}
 			}
+		} else {
+			for(int i=0; i < clients.size(); i++) {
+				client = clients[i];
+				sendData(client->connection->address, 0, 0, PACKET_TYPE_SERVER_DATA);			
+			}
 		}
 		}
 	}	
 	}	
 	
 	

+ 13 - 2
Core/Contents/Source/PolySound.cpp

@@ -295,7 +295,6 @@ Number Sound::getMaxDistance() {
 	return maxDistance;
 	return maxDistance;
 }
 }
 
 
-
 void Sound::setIsPositional(bool isPositional) {
 void Sound::setIsPositional(bool isPositional) {
 	this->isPositional = isPositional;
 	this->isPositional = isPositional;
 	if(isPositional) {
 	if(isPositional) {
@@ -392,6 +391,7 @@ ALuint Sound::loadBytes(const char *data, int size, int freq, int channels, int
 }
 }
 
 
 ALuint Sound::loadOGG(const String& fileName) {
 ALuint Sound::loadOGG(const String& fileName) {
+//	floatBuffer.clear();
 	vector<char> data;
 	vector<char> data;
 	
 	
 	alGenBuffers(1, &buffer);
 	alGenBuffers(1, &buffer);
@@ -443,10 +443,21 @@ ALuint Sound::loadOGG(const String& fileName) {
 	sampleLength = data.size() / sizeof(unsigned short);
 	sampleLength = data.size() / sizeof(unsigned short);
 	
 	
 	alBufferData(buffer, format, &data[0], static_cast<ALsizei>(data.size()), freq);
 	alBufferData(buffer, format, &data[0], static_cast<ALsizei>(data.size()), freq);
-	
+/*	
+	int32_t *ptr32 = (int32_t*) &data[0];
+	for(int i=0; i < data.size()/2; i++ ) {
+		floatBuffer.push_back(((Number)ptr32[i])/((Number)INT32_MAX));
+	}	
+*/	
 	return buffer;
 	return buffer;
 }
 }
 
 
+/*
+std::vector<Number> *Sound::getFloatBuffer() {
+	return &floatBuffer;
+}
+*/
+
 ALuint Sound::loadWAV(const String& fileName) {
 ALuint Sound::loadWAV(const String& fileName) {
 	long bytes;
 	long bytes;
 	vector <char> data;
 	vector <char> data;

+ 40 - 4
IDE/Contents/Include/PolycodeFrame.h

@@ -196,21 +196,46 @@ class PolycodeProjectTab : public UIElement {
 		PolycodeProjectTab(PolycodeProject *project, PolycodeEditorManager *editorManager);
 		PolycodeProjectTab(PolycodeProject *project, PolycodeEditorManager *editorManager);
 		~PolycodeProjectTab();
 		~PolycodeProjectTab();
 		
 		
+		void handleEvent(Event *event);
+		
 		EditorHolder *getEditorHolder();
 		EditorHolder *getEditorHolder();
-		void Resize(Number width, Number height);
-				
-		void showEditor(PolycodeEditor *editor);		
+		void Resize(Number width, Number height);				
+		void showEditor(PolycodeEditor *editor);
+		
+		void setActive(bool val);
+		bool isActive();
+		
+		String getTabName();
+		void setTabName(String newName);		
 		
 		
 		PolycodeProjectBrowser *getProjectBrowser();
 		PolycodeProjectBrowser *getProjectBrowser();
 			
 			
 	protected:
 	protected:
 	
 	
+		bool active;
+		String tabName;
 		UIHSizer *mainSizer;	
 		UIHSizer *mainSizer;	
 		PolycodeProjectBrowser *projectBrowser;
 		PolycodeProjectBrowser *projectBrowser;
 		EditorHolder *editorHolder;
 		EditorHolder *editorHolder;
 		PolycodeEditorManager *editorManager;
 		PolycodeEditorManager *editorManager;
 };
 };
 
 
+class PolycodeTabButton : public UIElement {
+	public:
+		PolycodeTabButton(PolycodeProjectTab *tab);
+		~PolycodeTabButton();
+
+		void setActive(bool val);
+		void handleEvent(Event *event);
+
+		PolycodeProjectTab *getTab();		
+	protected:
+		PolycodeProjectTab *tab;
+		UIRect *bgRect;
+		UILabel *tabLabel;
+	
+};
+
 class PolycodeProjectFrame : public UIElement {
 class PolycodeProjectFrame : public UIElement {
 	public:
 	public:
 		PolycodeProjectFrame(PolycodeProject *project, PolycodeEditorManager *editorManager);
 		PolycodeProjectFrame(PolycodeProject *project, PolycodeEditorManager *editorManager);
@@ -219,7 +244,13 @@ class PolycodeProjectFrame : public UIElement {
 		PolycodeProject *getProject();
 		PolycodeProject *getProject();
 		
 		
 		PolycodeProjectTab *addNewTab();
 		PolycodeProjectTab *addNewTab();
+		
+		void showTab(PolycodeProjectTab *tab);
+		
 		PolycodeProjectTab *getActiveTab();
 		PolycodeProjectTab *getActiveTab();
+		void handleEvent(Event *event);
+		
+		void restructTabs();
 		
 		
 		void Resize(Number width, Number height);
 		void Resize(Number width, Number height);
 		
 		
@@ -228,10 +259,15 @@ class PolycodeProjectFrame : public UIElement {
 	protected:
 	protected:
 	
 	
 		PolycodeProject *project;
 		PolycodeProject *project;
+		
+		UIElement *tabButtonAnchor;
+		
+		UIImageButton *newTabButton;
 	
 	
 		PolycodeEditorManager *editorManager;
 		PolycodeEditorManager *editorManager;
 		PolycodeProjectTab *activeTab;
 		PolycodeProjectTab *activeTab;
-		std::vector<PolycodeProjectTab*> tabs;
+		std::vector<PolycodeProjectTab*> tabs;		
+		std::vector<PolycodeTabButton*> tabButtons;
 };
 };
 
 
 
 

BIN
IDE/Contents/Resources/Images/new_tab_button.png


BIN
IDE/Contents/Resources/Images/tab_bg.png


+ 1 - 0
IDE/Contents/Resources/UIThemes/dark/theme.xml

@@ -4,6 +4,7 @@
 	<uiDefaultFontColor>0xe4e0e3ab</uiDefaultFontColor>
 	<uiDefaultFontColor>0xe4e0e3ab</uiDefaultFontColor>
 
 
 	<uiBgColor>0x322d2bff</uiBgColor>
 	<uiBgColor>0x322d2bff</uiBgColor>
+	<uiAccentColor>0x1f3234ff</uiAccentColor>
 	<uiHeaderBgColor>0x262120ff</uiHeaderBgColor>
 	<uiHeaderBgColor>0x262120ff</uiHeaderBgColor>
 	<uiSmallHeaderBgColor>0x2b2624ff</uiSmallHeaderBgColor>
 	<uiSmallHeaderBgColor>0x2b2624ff</uiSmallHeaderBgColor>
 	<uiHeaderFontColor>0xe4e3e0ad</uiHeaderFontColor>
 	<uiHeaderFontColor>0xe4e3e0ad</uiHeaderFontColor>

+ 144 - 7
IDE/Contents/Source/PolycodeFrame.cpp

@@ -812,10 +812,14 @@ void EditorHolder::Resize(Number width, Number height) {
 }
 }
 
 
 PolycodeProjectTab::PolycodeProjectTab(PolycodeProject *project, PolycodeEditorManager *editorManager) : UIElement() {
 PolycodeProjectTab::PolycodeProjectTab(PolycodeProject *project, PolycodeEditorManager *editorManager) : UIElement() {
+
+	tabName = "Default";
+	
 	this->editorManager = editorManager;
 	this->editorManager = editorManager;
 
 
 	editorHolder = new EditorHolder(project, editorManager, NULL);
 	editorHolder = new EditorHolder(project, editorManager, NULL);
 	editorHolder->setActive(true);
 	editorHolder->setActive(true);
+	editorHolder->addEventListener(this, UIEvent::CLOSE_EVENT);
 	
 	
 	mainSizer = new UIHSizer(100,100,200,true);
 	mainSizer = new UIHSizer(100,100,200,true);
 	addChild(mainSizer);					
 	addChild(mainSizer);					
@@ -823,9 +827,34 @@ PolycodeProjectTab::PolycodeProjectTab(PolycodeProject *project, PolycodeEditorM
 	mainSizer->addLeftChild(projectBrowser);
 	mainSizer->addLeftChild(projectBrowser);
 	mainSizer->addRightChild(editorHolder);
 	mainSizer->addRightChild(editorHolder);
 
 
+	active = false;
+
 	projectBrowser->treeContainer->getRootNode()->addEventListener(this, UITreeEvent::DRAG_START_EVENT);
 	projectBrowser->treeContainer->getRootNode()->addEventListener(this, UITreeEvent::DRAG_START_EVENT);
 }
 }
 
 
+void PolycodeProjectTab::setActive(bool val) {
+	active = val;
+}
+
+bool PolycodeProjectTab::isActive() {
+	return active;
+}
+
+void PolycodeProjectTab::handleEvent(Event *event) {
+	if(event->getDispatcher() == editorHolder && event->getEventCode() == UIEvent::CLOSE_EVENT) {
+		dispatchEvent(new UIEvent(), UIEvent::CLOSE_EVENT);
+	}
+	UIElement::handleEvent(event);
+}
+
+String PolycodeProjectTab::getTabName() {
+	return tabName;
+}
+
+void PolycodeProjectTab::setTabName(String newName) {
+	tabName = newName;
+}
+
 void PolycodeProjectTab::Resize(Number width, Number height) {
 void PolycodeProjectTab::Resize(Number width, Number height) {
 	mainSizer->Resize(width, height);
 	mainSizer->Resize(width, height);
 	UIElement::Resize(width, height);
 	UIElement::Resize(width, height);
@@ -853,11 +882,60 @@ PolycodeProjectTab::~PolycodeProjectTab() {
 
 
 }
 }
 
 
+PolycodeTabButton::PolycodeTabButton(PolycodeProjectTab *tab) : UIElement() {
+	this->tab = tab;
+	bgRect = new UIRect("Images/tab_bg.png");
+	addChild(bgRect);
+	bgRect->setColor(1.0, 1.0, 1.0, 0.4);
+	bgRect->processInputEvents = true;
+	processInputEvents = true;
+	bgRect->addEventListener(this, InputEvent::EVENT_MOUSEDOWN);
+	
+	setWidth(150);
+	setHeight(30);
+	
+	tabLabel = new UILabel(tab->getTabName().toUpperCase(), 16, "section");
+	tabLabel->setPosition((getWidth()-tabLabel->getWidth())/2.0, ((getHeight()-tabLabel->getHeight())/2.0) - 3.0);
+	addChild(tabLabel);
+}
+
+void PolycodeTabButton::handleEvent(Event *event) {
+	if(event->getDispatcher() == bgRect) {
+		dispatchEvent(new Event(), Event::SELECT_EVENT);
+	}
+	UIElement::handleEvent(event);
+}
+
+void PolycodeTabButton::setActive(bool val) {
+	if(val) {
+		bgRect->color.a = 0.4;
+	} else {
+		bgRect->color.a = 0.2;	
+	}
+}
+
+PolycodeProjectTab *PolycodeTabButton::getTab() {
+	return tab;
+}
+
+PolycodeTabButton::~PolycodeTabButton() {
+
+}
+
 PolycodeProjectFrame::PolycodeProjectFrame(PolycodeProject *project, PolycodeEditorManager *editorManager) {
 PolycodeProjectFrame::PolycodeProjectFrame(PolycodeProject *project, PolycodeEditorManager *editorManager) {
 	this->editorManager = editorManager;
 	this->editorManager = editorManager;
 	this->project = project;
 	this->project = project;
 	lastActiveEditorHolder = NULL;
 	lastActiveEditorHolder = NULL;
-	activeTab = addNewTab();
+	tabButtonAnchor = new UIElement();
+	addChild(tabButtonAnchor);
+	tabButtonAnchor->setPosition(400, -30);
+	
+	activeTab = NULL;
+	
+	newTabButton = new UIImageButton("Images/new_tab_button.png");
+	tabButtonAnchor->addChild(newTabButton);
+	newTabButton->addEventListener(this, UIEvent::CLICK_EVENT);
+	addNewTab();
 }
 }
 
 
 PolycodeProjectTab *PolycodeProjectFrame::getActiveTab() {
 PolycodeProjectTab *PolycodeProjectFrame::getActiveTab() {
@@ -867,16 +945,66 @@ PolycodeProjectTab *PolycodeProjectFrame::getActiveTab() {
 PolycodeProjectTab *PolycodeProjectFrame::addNewTab() {
 PolycodeProjectTab *PolycodeProjectFrame::addNewTab() {
 	PolycodeProjectTab *newTab = new PolycodeProjectTab(project, editorManager);
 	PolycodeProjectTab *newTab = new PolycodeProjectTab(project, editorManager);
 	tabs.push_back(newTab);
 	tabs.push_back(newTab);
-	addChild(newTab);
+	
+	PolycodeTabButton *newTabButton = new PolycodeTabButton(newTab);
+	tabButtonAnchor->addChild(newTabButton);
+	tabButtons.push_back(newTabButton);
+	newTabButton->addEventListener(this, Event::SELECT_EVENT);
+	showTab(newTab);
 	return newTab;
 	return newTab;
 }
 }
 
 
+void PolycodeProjectFrame::showTab(PolycodeProjectTab *tab) {
+	if(activeTab) {
+		activeTab->setActive(false);
+		activeTab->removeAllHandlersForListener(this);
+		removeChild(activeTab);
+	}
+
+	addChild(tab);
+	tab->addEventListener(this, UIEvent::CLOSE_EVENT);
+	tab->setActive(true);
+	tab->getEditorHolder()->setActive(true);
+	tab->Resize(getWidth(), getHeight());
+	activeTab = tab;
+	restructTabs();		
+}
+
+void PolycodeProjectFrame::restructTabs() {
+	int i;
+	for(i=0; i < tabButtons.size(); i++) {
+		tabButtons[i]->setPosition(i * 155.0, 0.0);
+		tabButtons[i]->setActive(tabButtons[i]->getTab()->isActive());		
+	}
+	newTabButton->setPosition((i * 155), 0.0);
+}
+
+void PolycodeProjectFrame::handleEvent(Event *event) {
+	if(event->getEventCode() == UIEvent::CLOSE_EVENT) {
+		dispatchEvent(new UIEvent, UIEvent::CLOSE_EVENT);
+	} else {
+		if(event->getDispatcher() == newTabButton) {
+			addNewTab();
+		} else {
+			for(int i=0; i < tabButtons.size(); i++) {
+				if(event->getDispatcher() == tabButtons[i]) {
+					if(event->getEventCode() == Event::SELECT_EVENT) {
+						showTab(tabButtons[i]->getTab());
+						break;
+					}
+				}
+			}
+		}
+	}
+}
+
 PolycodeProject *PolycodeProjectFrame::getProject() {
 PolycodeProject *PolycodeProjectFrame::getProject() {
 	return project;
 	return project;
 }
 }
 
 
 void PolycodeProjectFrame::Resize(Number width, Number height) {
 void PolycodeProjectFrame::Resize(Number width, Number height) {
 	activeTab->Resize(width, height);
 	activeTab->Resize(width, height);
+	UIElement::Resize(width, height);
 }
 }
 
 
 PolycodeProjectFrame::~PolycodeProjectFrame() {
 PolycodeProjectFrame::~PolycodeProjectFrame() {
@@ -915,11 +1043,6 @@ PolycodeFrame::PolycodeFrame(PolycodeEditorManager *editorManager) : UIElement()
 	welcomeEntity->addChild(newProjectButton);
 	welcomeEntity->addChild(newProjectButton);
 	welcomeEntity->addChild(examplesButton);
 	welcomeEntity->addChild(examplesButton);
 	
 	
-	consoleSizer = new UIVSizer(100,100,200, false);
-	console = new PolycodeConsole();	
-	consoleSizer->addBottomChild(console);
-	addChild(consoleSizer);
-	consoleSizer->setPosition(0.0, 45);
 	
 	
 	topBarBg = new UIRect(2,2);
 	topBarBg = new UIRect(2,2);
 	topBarBg->setColorInt(21, 18, 17, 255);
 	topBarBg->setColorInt(21, 18, 17, 255);
@@ -928,6 +1051,12 @@ PolycodeFrame::PolycodeFrame(PolycodeEditorManager *editorManager) : UIElement()
 	topBarBg->addEventListener(this, InputEvent::EVENT_MOUSEMOVE);
 	topBarBg->addEventListener(this, InputEvent::EVENT_MOUSEMOVE);
 	topBarBg->blockMouseInput = true;
 	topBarBg->blockMouseInput = true;
 	addChild(topBarBg);
 	addChild(topBarBg);
+
+	consoleSizer = new UIVSizer(100,100,200, false);
+	console = new PolycodeConsole();	
+	consoleSizer->addBottomChild(console);
+	addChild(consoleSizer);
+	consoleSizer->setPosition(0.0, 45);
 	
 	
 	logo = new UIImage("Images/barlogo.png");
 	logo = new UIImage("Images/barlogo.png");
 	addChild(logo);		
 	addChild(logo);		
@@ -1136,6 +1265,12 @@ void PolycodeFrame::showAssetBrowser(std::vector<String> extensions) {
 
 
 void PolycodeFrame::handleEvent(Event *event) {
 void PolycodeFrame::handleEvent(Event *event) {
 
 
+	if(event->getDispatcher() == activeProjectFrame) {
+		if(event->getEventCode() == UIEvent::CLOSE_EVENT) {
+			dispatchEvent(new UIEvent(), UIEvent::CLOSE_EVENT);
+		}
+	}
+
 	if(event->getDispatcher() == currentProjectSelector) {
 	if(event->getDispatcher() == currentProjectSelector) {
 		PolycodeProject *project = (PolycodeProject*)currentProjectSelector->getSelectedItem()->data;
 		PolycodeProject *project = (PolycodeProject*)currentProjectSelector->getSelectedItem()->data;
 		projectManager->setActiveProject(project);
 		projectManager->setActiveProject(project);
@@ -1317,6 +1452,7 @@ void PolycodeFrame::switchToProjectFrame(PolycodeProjectFrame *projectFrame) {
 		if(editorManager->getCurrentEditor()) {
 		if(editorManager->getCurrentEditor()) {
 			activeProjectFrame->lastActiveEditorHolder = editorManager->getCurrentEditor()->getEditorHolder();
 			activeProjectFrame->lastActiveEditorHolder = editorManager->getCurrentEditor()->getEditorHolder();
 		}
 		}
+		activeProjectFrame->removeAllHandlersForListener(this);
 	} 
 	} 
 	activeProjectFrame = projectFrame;
 	activeProjectFrame = projectFrame;
 	consoleSizer->addTopChild(activeProjectFrame);
 	consoleSizer->addTopChild(activeProjectFrame);
@@ -1325,6 +1461,7 @@ void PolycodeFrame::switchToProjectFrame(PolycodeProjectFrame *projectFrame) {
 	} else {
 	} else {
 		activeProjectFrame->getActiveTab()->getEditorHolder()->setActive(true);
 		activeProjectFrame->getActiveTab()->getEditorHolder()->setActive(true);
 	}
 	}
+	activeProjectFrame->addEventListener(this, UIEvent::CLOSE_EVENT);
 	Resize(getWidth(), getHeight());	
 	Resize(getWidth(), getHeight());	
 }
 }
 
 

+ 0 - 1
IDE/Contents/Source/PolycodeIDEApp.cpp

@@ -592,7 +592,6 @@ void PolycodeIDEApp::openFile(OSFileEntry file) {
 	if(editor) {
 	if(editor) {
 		editorManager->setCurrentEditor(editor);
 		editorManager->setCurrentEditor(editor);
 	}
 	}
-		
 }
 }
 
 
 void PolycodeIDEApp::handleEvent(Event *event) {
 void PolycodeIDEApp::handleEvent(Event *event) {

+ 42 - 53
IDE/Contents/Source/PolycodeRemoteDebugger.cpp

@@ -30,7 +30,8 @@ PolycodeRemoteDebugger::PolycodeRemoteDebugger(PolycodeProjectManager *projectMa
 
 
 	server->addEventListener(this, ServerEvent::EVENT_CLIENT_CONNECTED);
 	server->addEventListener(this, ServerEvent::EVENT_CLIENT_CONNECTED);
 	server->addEventListener(this, ServerEvent::EVENT_CLIENT_DISCONNECTED);		
 	server->addEventListener(this, ServerEvent::EVENT_CLIENT_DISCONNECTED);		
-	
+	server->addEventListener(this, ServerEvent::EVENT_CLIENT_DATA);		
+		
 	hasErred = false;
 	hasErred = false;
 
 
 }
 }
@@ -55,58 +56,48 @@ void PolycodeRemoteDebugger::Disconnect() {
 }
 }
 
 
 void PolycodeRemoteDebugger::handleEvent(Event *event) {
 void PolycodeRemoteDebugger::handleEvent(Event *event) {
-
-	for(int i=0; i < debuggerClients.size(); i++) {
-		if(event->getDispatcher() == debuggerClients[i]->client) {		
-			ServerClientEvent *clientEvent = (ServerClientEvent*) event;
-			switch(clientEvent->getEventCode()) {
-				case ServerClientEvent::EVENT_CLIENT_DATA:				
-					switch(clientEvent->dataType) {			
-						case EVENT_DEBUG_PRINT:
-						{
-							String printStr = String(clientEvent->data);
-							PolycodeConsole::print(printStr);		
-							PolycodeConsole::print("\n");
-						}
+	
+	if(event->getDispatcher() == server) {
+		ServerEvent *serverEvent = (ServerEvent*) event;	
+		switch(event->getEventCode()) {
+			case ServerEvent::EVENT_CLIENT_DATA:		
+			{	
+				switch(serverEvent->dataType) {			
+					case EVENT_DEBUG_PRINT:
+					{
+						String printStr = String(serverEvent->data);
+						PolycodeConsole::print(printStr);		
+						PolycodeConsole::print("\n");
+					}
 						break;	
 						break;	
-						case EVENT_DEBUG_ERROR:
-						{		
+					case EVENT_DEBUG_ERROR:
+					{		
 						
 						
-							if(!hasErred) {
-								RemoteErrorData *data = (RemoteErrorData*)clientEvent->data;			
-								PolycodeConsole::print("Error in file "+String(data->fileName)+" on line "+String::IntToString(data->lineNumber)+"\n");
-								PolycodeConsole::print(String(data->errorMessage)+"\n");
-								PolycodeConsole::print("Backtrace:\n");
-							
-								CoreServices::getInstance()->getCore()->makeApplicationMain();
-							}
-							
-//							hasErred = true;
+						if(!hasErred) {
+							RemoteErrorData *data = (RemoteErrorData*)serverEvent->data;			
+							PolycodeConsole::print("Error in file "+String(data->fileName)+" on line "+String::IntToString(data->lineNumber)+"\n");
+							PolycodeConsole::print(String(data->errorMessage)+"\n");
+							PolycodeConsole::print("Backtrace:\n");
 							
 							
+							CoreServices::getInstance()->getCore()->makeApplicationMain();
 						}
 						}
+						//							hasErred = true;
+					}
 						break;			
 						break;			
-						case EVENT_DEBUG_BACKTRACE_INFO:
-						{			
-
-							RemoteBacktraceData *data = (RemoteBacktraceData*)clientEvent->data;			
-							PolycodeConsole::print("In file "+String(data->fileName)+" on line "+String::IntToString(data->lineNumber)+"\n");
-							
-							PolycodeConsole::addBacktrace(String(data->fileName), data->lineNumber, projectManager->getActiveProject());
-							
-						}
-						break;							
-										
+					case EVENT_DEBUG_BACKTRACE_INFO:
+					{			
+						
+						RemoteBacktraceData *data = (RemoteBacktraceData*)serverEvent->data;			
+						PolycodeConsole::print("In file "+String(data->fileName)+" on line "+String::IntToString(data->lineNumber)+"\n");
+						
+						PolycodeConsole::addBacktrace(String(data->fileName), data->lineNumber, projectManager->getActiveProject());
+						
 					}
 					}
+						break;							
+						
+				}
+				}
 				break;
 				break;
-			}
-		}
-	}
-
-
-	if(event->getDispatcher() == server) {
-		ServerEvent *serverEvent = (ServerEvent*) event;
-		switch(serverEvent->getEventCode()) {
-		
 			case ServerEvent::EVENT_CLIENT_DISCONNECTED:		
 			case ServerEvent::EVENT_CLIENT_DISCONNECTED:		
 			{
 			{
 				for(int i=0;i<debuggerClients.size();i++) {
 				for(int i=0;i<debuggerClients.size();i++) {
@@ -118,19 +109,17 @@ void PolycodeRemoteDebugger::handleEvent(Event *event) {
 					}
 					}
 				}
 				}
 			}	
 			}	
-			break;
-			
+				break;
+				
 			case ServerEvent::EVENT_CLIENT_CONNECTED:
 			case ServerEvent::EVENT_CLIENT_CONNECTED:
 			{
 			{
 				DebuggerClient *newClient = new DebuggerClient();
 				DebuggerClient *newClient = new DebuggerClient();
 				newClient->client = serverEvent->client;
 				newClient->client = serverEvent->client;
-				newClient->client->addEventListener(this, ServerClientEvent::EVENT_CLIENT_DATA);
 				PolycodeConsole::print("Remote debugger client connected...\n");printf("CLIENT CONNECTED\n");		
 				PolycodeConsole::print("Remote debugger client connected...\n");printf("CLIENT CONNECTED\n");		
 				debuggerClients.push_back(newClient);				
 				debuggerClients.push_back(newClient);				
 			}
 			}
-			break;
+				break;
+				
 		}
 		}
-		
-	}
-
+	}				
 }
 }