Skip to content

Commit

Permalink
The GUI now displays wem IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
hpxro7 committed Oct 17, 2018
1 parent 6da100a commit 1e223f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gui/viewer/table.go
Expand Up @@ -64,6 +64,7 @@ func (t *WemTable) LoadDefaultModel() {
m.bindings = []*columnBinding{
{"Name", empty},
{"Replacing with", empty},
{"Id", empty},
{"Size", empty},
{"File offset", empty},
{"Padding", empty},
Expand All @@ -80,6 +81,7 @@ func (t *WemTable) LoadSoundBankModel(file *bnk.File) {
m.bindings = []*columnBinding{
{"Name", m.defaultOr(m.wemName)},
{"Replacing with", m.defaultOr(m.wemReplacement)},
{"Id", m.defaultOr(m.wemId)},
{"Size", m.defaultOr(m.wemSize)},
{"File offset", m.defaultOr(m.wemOffset)},
{"Padding", m.defaultOr(m.wemPadding)},
Expand All @@ -96,6 +98,7 @@ func (t *WemTable) LoadFilePackageModel(file *pck.File) {
m.bindings = []*columnBinding{
{"Name", m.defaultOr(m.wemName)},
{"Replacing with", m.defaultOr(m.wemReplacement)},
{"Id", m.defaultOr(m.wemId)},
{"Size", m.defaultOr(m.wemSize)},
{"File offset", m.defaultOr(m.wemOffset)},
{"Padding", m.defaultOr(m.wemPadding)},
Expand Down Expand Up @@ -216,6 +219,10 @@ func (m *WemModel) wemReplacement(index int) string {
return r.name
}

func (m *WemModel) wemId(index int) string {
return fmt.Sprintf("%d", m.ctn.Wems()[index].Descriptor.WemId)
}

func (m *WemModel) wemSize(index int) string {
return fmt.Sprintf("%d bytes", m.ctn.Wems()[index].Descriptor.Length)
}
Expand Down

0 comments on commit 1e223f9

Please sign in to comment.