diff --git a/StyleIDs.go b/StyleIDs.go index b5951142..b0f25c52 100644 --- a/StyleIDs.go +++ b/StyleIDs.go @@ -124,10 +124,20 @@ const ( StyleVarGrabRounding = StyleVarID(imgui.StyleVarGrabRounding) // grab-rounding // StyleVarTabRounding is a float. StyleVarTabRounding = StyleVarID(imgui.StyleVarTabRounding) // tab-rounding + // StyleVarTabBarBorderSize is a float. + StyleVarTabBarBorderSize = StyleVarID(imgui.StyleVarTabBarBorderSize) // StyleVarButtonTextAlign is a Vec2. StyleVarButtonTextAlign = StyleVarID(imgui.StyleVarButtonTextAlign) // button-text-align // StyleVarSelectableTextAlign is a Vec2. StyleVarSelectableTextAlign = StyleVarID(imgui.StyleVarSelectableTextAlign) // selectable-text-align + // StyleVarSeparatorTextBorderSize is a float + StyleVarSeparatorTextBorderSize = StyleVarID(imgui.StyleVarSeparatorTextBorderSize) + // SeparatorTextAlign is an ImVec2. + StyleVarSeparatorTextAlign = StyleVarID(imgui.StyleVarSeparatorTextAlign) + // SeparatorTextPadding is an ImVec2. + StyleVarSeparatorTextPadding = StyleVarID(imgui.StyleVarSeparatorTextPadding) + // DockingSeparatorSize is a float. + StyleVarDockingSeparatorSize = StyleVarID(imgui.StyleVarDockingSeparatorSize) ) // IsVec2 returns true if the style var id should be processed as imgui.Vec2 diff --git a/StyleIDs_string.go b/StyleIDs_string.go index 13d9adb5..ae18fb74 100644 --- a/StyleIDs_string.go +++ b/StyleIDs_string.go @@ -111,28 +111,22 @@ func _() { _ = x[StyleVarGrabMinSize-20] _ = x[StyleVarGrabRounding-21] _ = x[StyleVarTabRounding-22] + _ = x[StyleVarTabBarBorderSize-23] _ = x[StyleVarButtonTextAlign-24] _ = x[StyleVarSelectableTextAlign-25] + _ = x[StyleVarSeparatorTextBorderSize-26] + _ = x[StyleVarSeparatorTextAlign-27] + _ = x[StyleVarSeparatorTextPadding-28] + _ = x[StyleVarDockingSeparatorSize-29] } -const ( - _StyleVarID_name_0 = "alphadisabled-alphawindow-paddingwindow-roundingwindow-border-sizewindow-min-sizewindow-title-alignchild-roundingchild-border-sizepopup-roundingpopup-border-sizeframe-paddingframe-roundingframe-border-sizeitem-spacingitem-inner-spacingindent-spacingStyleVarCellPaddingscrollbar-sizescrollbar-roundinggrab-min-sizegrab-roundingtab-rounding" - _StyleVarID_name_1 = "button-text-alignselectable-text-align" -) +const _StyleVarID_name = "alphadisabled-alphawindow-paddingwindow-roundingwindow-border-sizewindow-min-sizewindow-title-alignchild-roundingchild-border-sizepopup-roundingpopup-border-sizeframe-paddingframe-roundingframe-border-sizeitem-spacingitem-inner-spacingindent-spacingStyleVarCellPaddingscrollbar-sizescrollbar-roundinggrab-min-sizegrab-roundingtab-roundingStyleVarTabBarBorderSizebutton-text-alignselectable-text-alignStyleVarSeparatorTextBorderSizeStyleVarSeparatorTextAlignStyleVarSeparatorTextPaddingStyleVarDockingSeparatorSize" -var ( - _StyleVarID_index_0 = [...]uint16{0, 5, 19, 33, 48, 66, 81, 99, 113, 130, 144, 161, 174, 188, 205, 217, 235, 249, 268, 282, 300, 313, 326, 338} - _StyleVarID_index_1 = [...]uint8{0, 17, 38} -) +var _StyleVarID_index = [...]uint16{0, 5, 19, 33, 48, 66, 81, 99, 113, 130, 144, 161, 174, 188, 205, 217, 235, 249, 268, 282, 300, 313, 326, 338, 362, 379, 400, 431, 457, 485, 513} func (i StyleVarID) String() string { - switch { - case 0 <= i && i <= 22: - return _StyleVarID_name_0[_StyleVarID_index_0[i]:_StyleVarID_index_0[i+1]] - case 24 <= i && i <= 25: - i -= 24 - return _StyleVarID_name_1[_StyleVarID_index_1[i]:_StyleVarID_index_1[i+1]] - default: + if i < 0 || i >= StyleVarID(len(_StyleVarID_index)-1) { return "StyleVarID(" + strconv.FormatInt(int64(i), 10) + ")" } + return _StyleVarID_name[_StyleVarID_index[i]:_StyleVarID_index[i+1]] } diff --git a/StyleIDs_string2enum.go b/StyleIDs_string2enum.go index e1b5282b..30cb6eb0 100644 --- a/StyleIDs_string2enum.go +++ b/StyleIDs_string2enum.go @@ -139,14 +139,9 @@ func StyleVarIDFromString(s string) StyleVarID { if len(s) == 0 { return 0 } - for i := range _StyleVarID_index_0[:len(_StyleVarID_index_0)-1] { - if s == _StyleVarID_name_0[_StyleVarID_index_0[i]:_StyleVarID_index_0[i+1]] { - return StyleVarID(i + 0) - } - } - for i := range _StyleVarID_index_1[:len(_StyleVarID_index_1)-1] { - if s == _StyleVarID_name_1[_StyleVarID_index_1[i]:_StyleVarID_index_1[i+1]] { - return StyleVarID(i + 24) + for i := range _StyleVarID_index[:len(_StyleVarID_index)-1] { + if s == _StyleVarID_name[_StyleVarID_index[i]:_StyleVarID_index[i+1]] { + return StyleVarID(i) } } panic(fmt.Errorf("unable to locate StyleVarID enum corresponding to %q", s)) @@ -201,9 +196,19 @@ func _(s string) { case "grab-rounding": // 22 case "tab-rounding": + // 23 + case "StyleVarTabBarBorderSize": // 24 case "button-text-align": // 25 case "selectable-text-align": + // 26 + case "StyleVarSeparatorTextBorderSize": + // 27 + case "StyleVarSeparatorTextAlign": + // 28 + case "StyleVarSeparatorTextPadding": + // 29 + case "StyleVarDockingSeparatorSize": } }