Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
xq114 committed Apr 4, 2021
1 parent 4b0927d commit 057e534
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions xpm/imgui.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (x *XImgui) GetRemoteVersion(version string) (string, error) {
return "", err
}

bigger_v180 := true
subfolder := "backends"
doc, err := xmlquery.Parse(strings.NewReader(res))
if err != nil {
Expand Down Expand Up @@ -55,12 +56,13 @@ func (x *XImgui) GetRemoteVersion(version string) (string, error) {
ver, err := strconv.ParseFloat(version, 64)
if err == nil && ver < 1.80 {
subfolder = "examples"
bigger_v180 = false
}
}


x.url = fmt.Sprintf("https://raw.githubusercontent.com/ocornut/imgui/%s", tag)
x.filelist = []string{
x.filelist = append(x.filelist,
"imconfig.h",
"imgui.h",
"imgui.cpp",
Expand All @@ -71,6 +73,9 @@ func (x *XImgui) GetRemoteVersion(version string) (string, error) {
"imstb_rectpack.h",
"imstb_textedit.h",
"imstb_truetype.h",
)
if bigger_v180 {
x.filelist = append(x.filelist, "imgui_tables.cpp")
}
if len(x.config) == 0 {
fmt.Println("using default config glfw & opengl3")
Expand Down

0 comments on commit 057e534

Please sign in to comment.