Nicolas Cannasse 5 éve
szülő
commit
28466bd129
6 módosított fájl, 34 hozzáadás és 10 törlés
  1. 8 5
      bin/cdb.css
  2. 10 2
      bin/cdb.less
  3. 0 1
      bin/style.less
  4. 2 0
      hide/comp/cdb/Cell.hx
  5. 12 0
      hide/comp/cdb/Cursor.hx
  6. 2 2
      hide/comp/cdb/Editor.hx

+ 8 - 5
bin/cdb.css

@@ -1,3 +1,6 @@
+.cdb-view > .hide-tabs > .tab > ::-webkit-scrollbar {
+  width: 12px;
+}
 .cdb {
   background-color: black;
   margin-bottom: 350px;
@@ -60,6 +63,10 @@
 .cdb .cdb-sheet tr.props td {
   overflow: visible;
 }
+.cdb .cdb-sheet > tbody > tr.props:last-child {
+  border-bottom: 0;
+  background-color: black;
+}
 .cdb .cdb-sheet td.edit {
   padding: 2px;
   padding-right: 6px;
@@ -123,7 +130,7 @@
 }
 .cdb .cdb-sheet tr.list > td {
   padding: 0;
-  padding-bottom: 5px;
+  padding-bottom: 20px;
   border: none;
 }
 .cdb .cdb-sheet th.t_tilepos {
@@ -194,10 +201,6 @@
   max-height: 32px;
   max-width: 32px;
 }
-.cdb .cdb-sheet td.t_list.parent-sub-table,
-.cdb .cdb-sheet td.t_properties.parent-sub-table {
-  background-color: #313a48;
-}
 .cdb .cdb-sheet td.t_enum {
   padding-left: 5px;
 }

+ 10 - 2
bin/cdb.less

@@ -1,3 +1,6 @@
+.cdb-view > .hide-tabs > .tab > ::-webkit-scrollbar {
+	width: 12px;
+}
 
 .cdb {
 
@@ -73,6 +76,11 @@
 			overflow : visible; // for flags dropdown
 		}
 
+		&> tbody > tr.props:last-child {
+			border-bottom: 0;
+			background-color: black;
+		}
+
 		td.edit {
 			padding : 2px;
 			padding-right : 6px;
@@ -142,7 +150,7 @@
 			background-color:black;
 			& > td {
 				padding : 0;
-				padding-bottom: 5px;
+				padding-bottom: 20px;
 				border : none;
 			}
 		}
@@ -217,7 +225,7 @@
 				max-width: 32px;
 			}
 			&.parent-sub-table {
-				background-color: #313a48;
+				//background-color: #2b3036;
 			}
 		}
 

+ 0 - 1
bin/style.less

@@ -1948,4 +1948,3 @@ div.sp-container {
     min-width: 600px;
 }
 
-// CDB view

+ 2 - 0
hide/comp/cdb/Cell.hx

@@ -30,6 +30,8 @@ class Cell extends Component {
 				e.stopPropagation();
 				@:privateAccess line.table.toggleList(this);
 			});
+		case TString if( column.kind == Script ):
+			element.click(function(_) edit());
 		default:
 			element.dblclick(function(_) edit());
 		}

+ 12 - 0
hide/comp/cdb/Cursor.hx

@@ -78,6 +78,18 @@ class Cursor {
 			update();
 			return;
 		}
+
+		// take care of current filter
+		var line = getLine();
+		if( line != null && dy != 0 ) {
+			var allLines = line.element.parent().children("tr").not(".separator");
+			var lines = allLines.not(".filtered");
+			var index = lines.index(line.element);
+			var targetLine = lines.get(hxd.Math.imax(index + dy,0));
+			if( targetLine == null || targetLine == line.element.get(0) ) return;
+			dy = allLines.index(targetLine) - allLines.index(line.element);
+		}
+
 		if( !shift )
 			select = null;
 		else if( select == null )

+ 2 - 2
hide/comp/cdb/Editor.hx

@@ -181,6 +181,7 @@ class Editor extends Component {
 
 	function onPaste() {
 		var text = ide.getClipboard();
+		var sheet = cursor.table.sheet;
 		if( clipboard == null || text != clipboard.text ) {
 			if( cursor.x < 0 || cursor.y < 0 ) return;
 			var x1 = cursor.x;
@@ -225,7 +226,6 @@ class Editor extends Component {
 			return;
 		}
 		beginChanges();
-		var sheet = cursor.table.sheet;
 		var posX = cursor.x < 0 ? 0 : cursor.x;
 		var posY = cursor.y < 0 ? 0 : cursor.y;
 		for( obj1 in clipboard.data ) {
@@ -630,7 +630,7 @@ class Editor extends Component {
 
 	function moveLine( line : Line, delta : Int ) {
 		beginChanges();
-		var index = sheet.moveLine(line.index, delta);
+		var index = line.table.sheet.moveLine(line.index, delta);
 		if( index != null ) {
 			cursor.set(cursor.table, -1, index);
 			refresh();