add width and height flags
This commit is contained in:
parent
d13abec803
commit
38016be3d3
|
@ -28,6 +28,8 @@ import (
|
||||||
|
|
||||||
var transition bool
|
var transition bool
|
||||||
var softCutDuration float64
|
var softCutDuration float64
|
||||||
|
var width int32
|
||||||
|
var height int32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* checkStdin checks if any data has been passed in through stdin and returns
|
* checkStdin checks if any data has been passed in through stdin and returns
|
||||||
|
@ -157,7 +159,7 @@ func milkbucket(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
defer sdl.Quit()
|
defer sdl.Quit()
|
||||||
|
|
||||||
m, err := newMilkDropWindow(800, 600, args, softCutDuration)
|
m, err := newMilkDropWindow(width, height, args, softCutDuration)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cobra.CheckErr(err)
|
cobra.CheckErr(err)
|
||||||
}
|
}
|
||||||
|
@ -205,4 +207,6 @@ func init() {
|
||||||
// when this action is called directly.
|
// when this action is called directly.
|
||||||
rootCmd.Flags().BoolVarP(&transition, "transition", "t", false, "smoothly transition between presets")
|
rootCmd.Flags().BoolVarP(&transition, "transition", "t", false, "smoothly transition between presets")
|
||||||
rootCmd.Flags().Float64VarP(&softCutDuration, "soft-cut-duration", "s", 3, "time in seconds for a soft transition between two presets (use with --transition)")
|
rootCmd.Flags().Float64VarP(&softCutDuration, "soft-cut-duration", "s", 3, "time in seconds for a soft transition between two presets (use with --transition)")
|
||||||
|
rootCmd.Flags().Int32Var(&width, "width", 800, "window width")
|
||||||
|
rootCmd.Flags().Int32Var(&height, "height", 600, "window height")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue