2
0
Ivan Safrin 13 жил өмнө
parent
commit
f9ff37a7d8

+ 2 - 0
IDE/Contents/Include/PolycodeProjectEditor.h

@@ -40,6 +40,8 @@ class PolycodeProjectEditor : public PolycodeEditor {
 	
 	
 	protected:
 	protected:
 	
 	
+	ScreenImage *grid;
+
 	Object configFile;	
 	Object configFile;	
 	
 	
 	std::vector<UICheckBox*> moduleCheckboxes;
 	std::vector<UICheckBox*> moduleCheckboxes;

BIN
IDE/Contents/Resources/UIThemes/default/button.png


BIN
IDE/Contents/Resources/UIThemes/default/buttonFocused.png


BIN
IDE/Contents/Resources/UIThemes/default/colorboxBg.png


BIN
IDE/Contents/Resources/UIThemes/default/colorboxFrame.png


BIN
IDE/Contents/Resources/UIThemes/default/combobox_bg.png


BIN
IDE/Contents/Resources/UIThemes/default/combobox_drop.png


BIN
IDE/Contents/Resources/UIThemes/default/combobox_items.png


+ 9 - 9
IDE/Contents/Resources/UIThemes/default/theme.xml

@@ -91,10 +91,10 @@
 	<uiComboBoxFontSize>11</uiComboBoxFontSize>
 	<uiComboBoxFontSize>11</uiComboBoxFontSize>
 	<uiComboBoxDropdownImage>combobox_drop.png</uiComboBoxDropdownImage>
 	<uiComboBoxDropdownImage>combobox_drop.png</uiComboBoxDropdownImage>
 	<uiComboBoxBgImage>combobox_bg.png</uiComboBoxBgImage>
 	<uiComboBoxBgImage>combobox_bg.png</uiComboBoxBgImage>
-	<uiComboBoxBgT>3</uiComboBoxBgT>
-	<uiComboBoxBgR>3</uiComboBoxBgR>
-	<uiComboBoxBgB>3</uiComboBoxBgB>
-	<uiComboBoxBgL>3</uiComboBoxBgL>				
+	<uiComboBoxBgT>6</uiComboBoxBgT>
+	<uiComboBoxBgR>6</uiComboBoxBgR>
+	<uiComboBoxBgB>6</uiComboBoxBgB>
+	<uiComboBoxBgL>6</uiComboBoxBgL>				
 	<uiComboBoxItemsBgImage>combobox_items.png</uiComboBoxItemsBgImage>	
 	<uiComboBoxItemsBgImage>combobox_items.png</uiComboBoxItemsBgImage>	
 	<uiComboBoxDropdownBgT>3</uiComboBoxDropdownBgT>
 	<uiComboBoxDropdownBgT>3</uiComboBoxDropdownBgT>
 	<uiComboBoxDropdownBgR>3</uiComboBoxDropdownBgR>
 	<uiComboBoxDropdownBgR>3</uiComboBoxDropdownBgR>
@@ -109,12 +109,12 @@
 	<uiComboBoxTextOffsetY>3</uiComboBoxTextOffsetY>		
 	<uiComboBoxTextOffsetY>3</uiComboBoxTextOffsetY>		
 
 
 	<uiColorBoxFrameImage>colorboxFrame.png</uiColorBoxFrameImage>
 	<uiColorBoxFrameImage>colorboxFrame.png</uiColorBoxFrameImage>
-	<uiColorBoxFrameImageT>3</uiColorBoxFrameImageT>
-	<uiColorBoxFrameImageR>3</uiColorBoxFrameImageR>
-	<uiColorBoxFrameImageB>3</uiColorBoxFrameImageB>
-	<uiColorBoxFrameImageL>3</uiColorBoxFrameImageL>					
+	<uiColorBoxFrameImageT>7</uiColorBoxFrameImageT>
+	<uiColorBoxFrameImageR>7</uiColorBoxFrameImageR>
+	<uiColorBoxFrameImageB>7</uiColorBoxFrameImageB>
+	<uiColorBoxFrameImageL>7</uiColorBoxFrameImageL>					
 	<uiColorBoxBgImage>colorboxBg.png</uiColorBoxBgImage>
 	<uiColorBoxBgImage>colorboxBg.png</uiColorBoxBgImage>
-	<uiFrameInset>1</uiFrameInset>
+	<uiColorBoxFrameInset>2</uiColorBoxFrameInset>
 
 
 	<uiColorPickerMainBg>colorPickerMainBg.png</uiColorPickerMainBg>
 	<uiColorPickerMainBg>colorPickerMainBg.png</uiColorPickerMainBg>
 	<uiColorPickerMainFrame>colorPickerMainFrame.png</uiColorPickerMainFrame>
 	<uiColorPickerMainFrame>colorPickerMainFrame.png</uiColorPickerMainFrame>

BIN
IDE/Contents/Resources/UIThemes/default/windowBg.png


+ 10 - 0
IDE/Contents/Source/PolycodeProjectEditor.cpp

@@ -25,6 +25,15 @@
 
 
 PolycodeProjectEditor::PolycodeProjectEditor() : PolycodeEditor(true){
 PolycodeProjectEditor::PolycodeProjectEditor() : PolycodeEditor(true){
 
 
+	grid = new ScreenImage("editorGrid.png");
+	
+	addChild(grid);
+	grid->snapToPixels = true;
+	
+	grid->getTexture()->clamp = false;
+	grid->getTexture()->recreateFromImageData();	
+	
+
 	Config *conf = CoreServices::getInstance()->getConfig();	
 	Config *conf = CoreServices::getInstance()->getConfig();	
 	String fontName = conf->getStringValue("Polycode", "uiDefaultFontName");
 	String fontName = conf->getStringValue("Polycode", "uiDefaultFontName");
 	int fontSize = conf->getNumericValue("Polycode", "uiDefaultFontSize");	
 	int fontSize = conf->getNumericValue("Polycode", "uiDefaultFontSize");	
@@ -235,6 +244,7 @@ bool PolycodeProjectEditor::openFile(String filePath) {
 }
 }
 
 
 void PolycodeProjectEditor::Resize(int x, int y) {
 void PolycodeProjectEditor::Resize(int x, int y) {
+	grid->setImageCoordinates(0,0,x,y);	
 }
 }
 
 
 void PolycodeProjectEditor::saveFile() {
 void PolycodeProjectEditor::saveFile() {

+ 1 - 1
Modules/Contents/UI/Include/PolyUIButton.h

@@ -33,7 +33,7 @@ namespace Polycode {
 
 
 	class _PolyExport UIButton : public UIElement {
 	class _PolyExport UIButton : public UIElement {
 		public:
 		public:
-			UIButton(String text, Number width, Number height = 26);
+			UIButton(String text, Number width, Number height = 28);
 			~UIButton();		
 			~UIButton();		
 			void handleEvent(Event *event);
 			void handleEvent(Event *event);
 			
 			

+ 3 - 0
Modules/Contents/UI/Include/PolyUITextInput.h

@@ -80,6 +80,9 @@ namespace Polycode {
 			void Cut();
 			void Cut();
 			void Copy();
 			void Copy();
 			void Paste();
 			void Paste();
+			
+			void showLine(unsigned int lineNumber, bool top);
+
 					
 					
 			void Resize(Number width, Number height);
 			void Resize(Number width, Number height);
 			
 			

+ 3 - 1
Modules/Contents/UI/Source/PolyUIColorBox.cpp

@@ -374,7 +374,7 @@ UIColorBox::UIColorBox(Color initialColor, Number width, Number height) : UIElem
 
 
 	String frameImageFile = conf->getStringValue("Polycode", "uiColorBoxFrameImage");
 	String frameImageFile = conf->getStringValue("Polycode", "uiColorBoxFrameImage");
 	String bgImageFile = conf->getStringValue("Polycode", "uiColorBoxBgImage");
 	String bgImageFile = conf->getStringValue("Polycode", "uiColorBoxBgImage");
-	Number frameInset = conf->getNumericValue("Polycode", "uiFrameInset");
+	Number frameInset = conf->getNumericValue("Polycode", "uiColorBoxFrameInset");
 
 
 	Number st = conf->getNumericValue("Polycode", "uiColorBoxFrameImageT");
 	Number st = conf->getNumericValue("Polycode", "uiColorBoxFrameImageT");
 	Number sr = conf->getNumericValue("Polycode", "uiColorBoxFrameImageR");
 	Number sr = conf->getNumericValue("Polycode", "uiColorBoxFrameImageR");
@@ -385,6 +385,7 @@ UIColorBox::UIColorBox(Color initialColor, Number width, Number height) : UIElem
 	bgImage = new ScreenShape(ScreenShape::SHAPE_RECT, width-(frameInset*2), height-(frameInset*2));
 	bgImage = new ScreenShape(ScreenShape::SHAPE_RECT, width-(frameInset*2), height-(frameInset*2));
 	bgImage->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
 	bgImage->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
 	bgImage->loadTexture(bgImageFile);
 	bgImage->loadTexture(bgImageFile);
+	bgImage->setPosition(frameInset, frameInset);	
 	addChild(bgImage);
 	addChild(bgImage);
 
 
 	bgImage->addEventListener(this, InputEvent::EVENT_MOUSEDOWN);
 	bgImage->addEventListener(this, InputEvent::EVENT_MOUSEDOWN);
@@ -392,6 +393,7 @@ UIColorBox::UIColorBox(Color initialColor, Number width, Number height) : UIElem
 
 
 	colorShape = new ScreenShape(ScreenShape::SHAPE_RECT, width-(frameInset*2), height-(frameInset*2));
 	colorShape = new ScreenShape(ScreenShape::SHAPE_RECT, width-(frameInset*2), height-(frameInset*2));
 	colorShape->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
 	colorShape->setPositionMode(ScreenEntity::POSITION_TOPLEFT);
+	colorShape->setPosition(frameInset, frameInset);
 	addChild(colorShape);
 	addChild(colorShape);
 
 
 		
 		

+ 4 - 0
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -691,6 +691,10 @@ void UITextInput::Paste() {
 	insertText(CoreServices::getInstance()->getCore()->getClipboardString());
 	insertText(CoreServices::getInstance()->getCore()->getClipboardString());
 }
 }
 
 
+void UITextInput::showLine(unsigned int lineNumber, bool top) {
+	
+}
+
 void UITextInput::onKeyDown(PolyKEY key, wchar_t charCode) {
 void UITextInput::onKeyDown(PolyKEY key, wchar_t charCode) {
 	
 	
 	if(!hasFocus)
 	if(!hasFocus)