Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

giu: change ianling/giu -> AllenDang/giu; fix build errors #336

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ module github.com/OpenDiablo2/HellSpawner
go 1.16

require (
github.com/AllenDang/giu v0.5.6-0.20210730102924-9c164998fd21
github.com/AllenDang/imgui-go v1.12.1-0.20210730064543-c33ee0f359ce
github.com/OpenDiablo2/OpenDiablo2 v0.0.0-20210514222603-a688d660a0f7
github.com/OpenDiablo2/dialog v0.0.0-20201230220514-26162241209f
github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d // indirect
github.com/enriquebris/goconcurrentqueue v0.6.0
github.com/faiface/beep v1.0.2
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be
github.com/go-resty/resty/v2 v2.6.0 // indirect
github.com/gravestench/osinfo v0.0.0-20210525170338-34eb1ac010f7
github.com/hajimehoshi/oto v0.7.1 // indirect
github.com/ianling/giu v0.5.1-0.20210619154109-b35b66c84649
github.com/ianling/imgui-go v1.12.1-0.20210420174252-e90a22fb87e6
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7
github.com/kirsle/configdir v0.0.0-20170128060238-e45d2f54772f
github.com/mattn/go-runewidth v0.0.13 // indirect
Expand All @@ -23,7 +23,7 @@ require (
github.com/russross/blackfriday v1.6.0
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
golang.org/x/exp v0.0.0-20210526181343-b47a03e3048a // indirect
golang.org/x/image v0.0.0-20210504121937-7319ad40d33e // indirect
golang.org/x/image v0.0.0-20210504121937-7319ad40d33e
golang.org/x/mobile v0.0.0-20210527171505-7e972142eb43 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/sys v0.0.0-20210601080250-7ecdf8ef093b // indirect
Expand Down
21 changes: 12 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/AllenDang/giu v0.5.6-0.20210730102924-9c164998fd21 h1:iV42A2Tz2mjpSxB8b1B5FERppLSjFjJa7cJA3hLioq4=
github.com/AllenDang/giu v0.5.6-0.20210730102924-9c164998fd21/go.mod h1:sowdXWQy74aTDOtrM2u/NMlis5j7xjtHcrbc+IkrmwU=
github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8 h1:dKZMqib/yUDoCFigmz2agG8geZ/e3iRq304/KJXqKyw=
github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8/go.mod h1:b4uuDd0s6KRIPa84cEEchdQ9ICh7K0OryZHbSzMca9k=
github.com/AllenDang/imgui-go v1.12.1-0.20210730064543-c33ee0f359ce h1:/7+xVnxn5sTeKHy78zFsMxG/n7duZ28b5woDlIB0Dnk=
github.com/AllenDang/imgui-go v1.12.1-0.20210730064543-c33ee0f359ce/go.mod h1:+pYwstqlGGlU2lI1FREPlVAKP2nwV+bNhAlMrbQynhQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/JoshVarga/blast v0.0.0-20180421040937-681c804fb9f0 h1:tDnuU0igiBiQFjsvq1Bi7DpoUjqI76VVvW045vpeFeM=
Expand Down Expand Up @@ -29,8 +35,9 @@ github.com/go-gl/gl v0.0.0-20210501111010-69f74958bac0 h1:7xNa69TzlTrKtlBtE4yyNR
github.com/go-gl/gl v0.0.0-20210501111010-69f74958bac0/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200707082815-5321531c36a2/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb h1:T6gaWBvRzJjuOrdCtg8fXXjKai2xSDqWTcKFUPuw8Tw=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210410170116-ea3d685f79fb/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be h1:vEIVIuBApEBQTEJt19GfhoU+zFSV+sNTa9E9FdnRYfk=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-restruct/restruct v1.2.0-alpha h1:2Lp474S/9660+SJjpVxoKuWX09JsXHSrdV7Nv3/gkvc=
github.com/go-restruct/restruct v1.2.0-alpha/go.mod h1:KqrpKpn4M8OLznErihXTGLlsXFGeLxHUrLRRI/1YjGk=
github.com/go-resty/resty/v2 v2.3.0/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU=
Expand Down Expand Up @@ -58,12 +65,6 @@ github.com/hajimehoshi/oto v0.6.1/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2h
github.com/hajimehoshi/oto v0.6.8/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI=
github.com/hajimehoshi/oto v0.7.1 h1:I7maFPz5MBCwiutOrz++DLdbr4rTzBsbBuV2VpgU9kk=
github.com/hajimehoshi/oto v0.7.1/go.mod h1:wovJ8WWMfFKvP587mhHgot/MBr4DnNy9m6EepeVGnos=
github.com/ianling/giu v0.5.1-0.20210524205023-4d3114338b69 h1:8/TnUIv7dy6smaOQiWsOB9MMHbiOgHrllYXRimQPx+Y=
github.com/ianling/giu v0.5.1-0.20210524205023-4d3114338b69/go.mod h1:twqK/c83RuUbBV8sWkV9TMpcdaBs3Pec2FBN5gC+hEA=
github.com/ianling/giu v0.5.1-0.20210619154109-b35b66c84649 h1:V+knrBNqCF2mrLnQRSiS27DwlSlOqzQxwE7Nx0dQCfA=
github.com/ianling/giu v0.5.1-0.20210619154109-b35b66c84649/go.mod h1:twqK/c83RuUbBV8sWkV9TMpcdaBs3Pec2FBN5gC+hEA=
github.com/ianling/imgui-go v1.12.1-0.20210420174252-e90a22fb87e6 h1:cYyhJBJpHS3ccwS/Hn9SI4T3SUzORnfiBvB+/1mopLs=
github.com/ianling/imgui-go v1.12.1-0.20210420174252-e90a22fb87e6/go.mod h1:XJ3IHn74S/5gKA6R5tYya4x7bsucY4tHgfnGO94FmEc=
github.com/jakecoffman/cp v1.0.0/go.mod h1:JjY/Fp6d8E1CHnu74gWNnU0+b9VzEdUVPoJxg2PsTQg=
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 h1:g0fAGBisHaEQ0TRq1iBvemFRf+8AEWEmBESSiWB3Vsc=
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk=
Expand All @@ -77,6 +78,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lucasb-eyer/go-colorful v0.0.0-20181028223441-12d3b2882a08/go.mod h1:NXg0ArsFk0Y01623LgUqoqcouGDB+PwCCQlrwrG6xJ4=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
Expand Down Expand Up @@ -105,6 +108,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM=
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
github.com/sahilm/fuzzy v0.1.0 h1:FzWGaw2Opqyu+794ZQ9SYifWv2EIXpwP4q8dY1kDAwI=
github.com/sahilm/fuzzy v0.1.0/go.mod h1:VFvziUEIMCrT6A6tw2RFIXPXXmzXbOsSHF0DOI8ZK9Y=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo=
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM=
Expand Down Expand Up @@ -162,8 +167,6 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
11 changes: 5 additions & 6 deletions hsapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import (
"sync"
"time"

g "github.com/ianling/giu"
"github.com/ianling/imgui-go"
g "github.com/AllenDang/giu"

"github.com/OpenDiablo2/dialog"
"github.com/go-gl/glfw/v3.3/glfw"
Expand Down Expand Up @@ -89,10 +88,10 @@ type App struct {
editorManagerMutex sync.RWMutex
focusedEditor hscommon.EditorWindow

fontFixed imgui.Font
fontFixedSmall imgui.Font
diabloBoldFont imgui.Font
diabloRegularFont imgui.Font
fontFixed *g.FontInfo
fontFixedSmall *g.FontInfo
diabloBoldFont *g.FontInfo
diabloRegularFont *g.FontInfo

TextureLoader hscommon.TextureLoader

Expand Down
2 changes: 1 addition & 1 deletion hsapp/menubar.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"runtime"
"strings"

g "github.com/AllenDang/giu"
"github.com/OpenDiablo2/dialog"
"github.com/gravestench/osinfo"
g "github.com/ianling/giu"
"github.com/pkg/browser"

"github.com/OpenDiablo2/HellSpawner/hscommon"
Expand Down
34 changes: 9 additions & 25 deletions hsapp/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import (
"github.com/faiface/beep"
"github.com/faiface/beep/speaker"

g "github.com/ianling/giu"
"github.com/ianling/imgui-go"
g "github.com/AllenDang/giu"

"github.com/OpenDiablo2/HellSpawner/hswindow/hseditor/hsds1editor"
"github.com/OpenDiablo2/HellSpawner/hswindow/hseditor/hsdt1editor"
Expand Down Expand Up @@ -77,7 +76,8 @@ func (a *App) setup() (err error) {
}

func (a *App) setupMasterWindow() {
a.masterWindow = g.NewMasterWindow(baseWindowTitle, baseWindowW, baseWindowH, 0, a.setupFonts)
a.masterWindow = g.NewMasterWindow(baseWindowTitle, baseWindowW, baseWindowH, 0)
a.setupFonts()

bgColor := a.determineBackgroundColor()
a.masterWindow.SetBgColor(bgColor)
Expand Down Expand Up @@ -206,45 +206,29 @@ func (a *App) setupDialogs() error {
// it will only load an appropriate glyph ranges for
// displayed text (e.g. for string/font table editors)
func (a *App) setupFonts() {
fonts := g.Context.IO().Fonts()
ranges := imgui.NewGlyphRanges()
builder := imgui.NewFontGlyphRangesBuilder()

builder.AddRanges(fonts.GlyphRangesDefault())

font := hsassets.FontNotoSansRegular

switch a.config.Locale {
// glyphs supported by default
case hsenum.LocaleEnglish, hsenum.LocaleGerman,
hsenum.LocaleFrench, hsenum.LocaleItalien,
hsenum.LocaleSpanish:
hsenum.LocaleSpanish, hsenum.LocalePolish:
// noop
case hsenum.LocaleChineseTraditional:
font = hsassets.FontSourceHanSerif

builder.AddRanges(fonts.GlyphRangesChineseFull())
case hsenum.LocaleKorean:
font = hsassets.FontSourceHanSerif

builder.AddRanges(fonts.GlyphRangesKorean())
case hsenum.LocalePolish:
builder.AddText(hsenum.PolishSpecialCharacters)
}

// build ranges
builder.BuildRanges(ranges)

// setup default font
fonts.AddFontFromMemoryTTFV(font, baseFontSize, 0, ranges.Data())
g.SetDefaultFontFromBytes(font, baseFontSize)

// please note, that the following fonts will not use
// previously generated glyph ranges.
// they'll have a default range
a.fontFixed = fonts.AddFontFromMemoryTTF(hsassets.FontCascadiaCode, fixedFontSize)
a.fontFixedSmall = fonts.AddFontFromMemoryTTF(hsassets.FontCascadiaCode, fixedSmallFontSize)
a.diabloRegularFont = fonts.AddFontFromMemoryTTF(hsassets.FontDiabloRegular, diabloRegularFontSize)
a.diabloBoldFont = fonts.AddFontFromMemoryTTF(hsassets.FontDiabloBold, diabloBoldFontSize)
a.fontFixed = g.AddFontFromBytes("fixed font", hsassets.FontCascadiaCode, fixedFontSize)
a.fontFixedSmall = g.AddFontFromBytes("small fixed font", hsassets.FontCascadiaCode, fixedSmallFontSize)
a.diabloRegularFont = g.AddFontFromBytes("diablo regular", hsassets.FontDiabloRegular, diabloRegularFontSize)
a.diabloBoldFont = g.AddFontFromBytes("diablo bold", hsassets.FontDiabloBold, diabloBoldFontSize)
}

func (a *App) registerGlobalKeyboardShortcuts() {
Expand Down
2 changes: 1 addition & 1 deletion hscommon/editorwindow.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hscommon

import (
"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/HellSpawner/hscommon/hsstate"
)
Expand Down
2 changes: 1 addition & 1 deletion hscommon/main_menu_updater.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hscommon

import "github.com/ianling/giu"
import "github.com/AllenDang/giu"

// MainMenuUpdater represents main menu updater
type MainMenuUpdater interface {
Expand Down
2 changes: 1 addition & 1 deletion hscommon/renderable.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hscommon

import "github.com/ianling/giu"
import "github.com/AllenDang/giu"

// Renderable represents renderable objects
type Renderable interface {
Expand Down
2 changes: 1 addition & 1 deletion hscommon/textureloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/enriquebris/goconcurrentqueue"

g "github.com/ianling/giu"
g "github.com/AllenDang/giu"
)

// TextureLoadRequestItem represents texture request item
Expand Down
2 changes: 1 addition & 1 deletion hscommon/toolwindow.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hscommon

import (
"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/HellSpawner/hscommon/hsstate"
)
Expand Down
2 changes: 1 addition & 1 deletion hswidget/animdatawidget/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"sort"

"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/HellSpawner/hsassets"
)
Expand Down
10 changes: 5 additions & 5 deletions hswidget/animdatawidget/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strconv"
"strings"

"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2animdata"

Expand Down Expand Up @@ -100,7 +100,7 @@ func (p *widget) buildAnimationsList() {
giu.Layout{
p.makeSearchLayout(),
giu.Separator(),
giu.Child("##"+p.id+"keyList").Border(false).
giu.Child().Border(false).
Size(listW, listH).
Layout(giu.Layout{
giu.Custom(func() {
Expand Down Expand Up @@ -157,13 +157,13 @@ func (p *widget) buildViewRecordLayout() {
}),
giu.Row(
giu.Label("Frames per direction: "),
giu.InputInt("##"+p.id+"recordFramesPerDirection", &fpd).Size(inputIntW).OnChange(func() {
giu.InputInt(&fpd).Size(inputIntW).OnChange(func() {
record.SetFramesPerDirection(uint32(fpd))
}),
),
giu.Row(
giu.Label("Speed: "),
giu.InputInt("##"+p.id+"recordSpeed", &speed).Size(inputIntW).OnChange(func() {
giu.InputInt(&speed).Size(inputIntW).OnChange(func() {
record.SetSpeed(uint16(speed))
}),
),
Expand Down Expand Up @@ -208,7 +208,7 @@ func (p *widget) makeSearchLayout() giu.Layout {

return giu.Layout{
giu.Label("Search or type new entry name:"),
giu.InputText("##"+p.id+"newEntryName", &state.Name).Size(listW).OnChange(func() {
giu.InputText(&state.Name).Size(listW).OnChange(func() {
// formatting
state.Name = strings.ToUpper(state.Name)
state.Name = strings.ReplaceAll(state.Name, " ", "")
Expand Down
2 changes: 1 addition & 1 deletion hswidget/cofwidget/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cofwidget
import (
"fmt"

"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2cof"
Expand Down
7 changes: 3 additions & 4 deletions hswidget/cofwidget/widget.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"log"
"strconv"

"github.com/ianling/giu"
"github.com/AllenDang/giu"

"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2cof"
Expand Down Expand Up @@ -76,11 +76,11 @@ func (p *widget) makeViewerLayout() giu.Layout {
state := p.getState()

return giu.Layout{
giu.TabBar("COFViewerTabs").Layout(giu.Layout{
giu.TabBar().TabItems(
giu.TabItem("Animation").Layout(p.makeAnimationTab(state)),
giu.TabItem("Layer").Layout(p.makeLayerTab(state)),
giu.TabItem("Priority").Layout(p.makePriorityTab(state)),
}),
),
}
}

Expand Down Expand Up @@ -109,7 +109,6 @@ func (p *widget) makeAnimationTab(state *widgetState) giu.Layout {

speedLabel := giu.Label(strSpeed)
speedInput := hswidget.MakeInputInt(
"##"+p.id+"CovViewerSpeedValue",
speedInputW,
&p.cof.Speed,
setSpeed,
Expand Down
8 changes: 4 additions & 4 deletions hswidget/custom_widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"math"

"github.com/ianling/giu"
"github.com/ianling/imgui-go"
"github.com/AllenDang/giu"
"github.com/AllenDang/imgui-go"

"github.com/OpenDiablo2/HellSpawner/hsassets"
"github.com/OpenDiablo2/HellSpawner/hscommon"
Expand Down Expand Up @@ -167,7 +167,7 @@ func SetByteToInt(input int32, output *byte) {

// MakeInputInt creates input intager using POINTER given
// additionally, for byte checks, if value smaller than 255
func MakeInputInt(id string, width int32, output interface{}, optionalCB func()) *giu.InputIntWidget {
func MakeInputInt(width int32, output interface{}, optionalCB func()) *giu.InputIntWidget {
var input int32
switch o := output.(type) {
case *byte:
Expand All @@ -178,7 +178,7 @@ func MakeInputInt(id string, width int32, output interface{}, optionalCB func())
panic(fmt.Sprintf("MakeInputInt: invalid value type %T given", o))
}

return giu.InputInt(id, &input).Size(float32(width)).OnChange(func() {
return giu.InputInt(&input).Size(float32(width)).OnChange(func() {
switch o := output.(type) {
case *byte:
SetByteToInt(input, o)
Expand Down
2 changes: 1 addition & 1 deletion hswidget/dc6widget/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"time"

"github.com/ianling/giu"
"github.com/AllenDang/giu"
gim "github.com/ozankasikci/go-image-merge"

"github.com/OpenDiablo2/HellSpawner/hscommon/hsutil"
Expand Down
Loading