Jelajahi Sumber

Add flow.horizontal

trethaller 6 tahun lalu
induk
melakukan
56e0bd2dcf
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      h2d/domkit/BaseComponents.hx

+ 5 - 0
h2d/domkit/BaseComponents.hx

@@ -349,6 +349,7 @@ class FlowComp extends DrawableComp implements domkit.Component.ComponentDecl<h2
 	@:p(flowBackground) var background : { tile : h2d.Tile, borderW : Int, borderH : Int };
 	@:p var debug : Bool;
 	@:p var vertical : Bool;
+	@:p var horizontal : Bool;
 	@:p var multiline : Bool;
 	@:p(box) var padding : { left : Int, right : Int, top : Int, bottom : Int };
 	@:p var paddingLeft : Int;
@@ -422,6 +423,10 @@ class FlowComp extends DrawableComp implements domkit.Component.ComponentDecl<h2
 		o.isVertical = v;
 	}
 
+	static function set_horizontal( o : h2d.Flow, v ) {
+		o.isVertical = !v;
+	}
+
 	static function set_hspacing( o : h2d.Flow, v ) {
 		o.horizontalSpacing = v;
 	}