Renamed to ProtocolPacketForger (ppf)
This commit is contained in:
parent
ccb1a93aa5
commit
755be5f962
|
@ -1,6 +1,6 @@
|
||||||
# This is an example .goreleaser.yml file with some sensible defaults.
|
# This is an example .goreleaser.yml file with some sensible defaults.
|
||||||
# Make sure to check the documentation at https://goreleaser.com
|
# Make sure to check the documentation at https://goreleaser.com
|
||||||
project_name: npc
|
project_name: ppf
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
# You may remove this if you don't use go modules.
|
# You may remove this if you don't use go modules.
|
||||||
|
@ -8,9 +8,9 @@ before:
|
||||||
# you may remove this if you don't need go generate
|
# you may remove this if you don't need go generate
|
||||||
- go generate ./...
|
- go generate ./...
|
||||||
builds:
|
builds:
|
||||||
- main: ./cmd/npc/main.go
|
- main: ./cmd/ppf/main.go
|
||||||
id: "npc"
|
id: "ppf"
|
||||||
binary: npc
|
binary: ppf
|
||||||
# env:
|
# env:
|
||||||
# - CGO_ENABLED=0
|
# - CGO_ENABLED=0
|
||||||
goarch:
|
goarch:
|
||||||
|
|
32
app.go
32
app.go
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
|
@ -9,7 +9,7 @@ import (
|
||||||
|
|
||||||
func Appmain() {
|
func Appmain() {
|
||||||
a := app.New()
|
a := app.New()
|
||||||
w := a.NewWindow("Hello")
|
w := a.NewWindow("ProtocolPacketForger")
|
||||||
w.Resize(fyne.NewSize(800, 600))
|
w.Resize(fyne.NewSize(800, 600))
|
||||||
|
|
||||||
hello := widget.NewLabel("Hello Fyne!")
|
hello := widget.NewLabel("Hello Fyne!")
|
||||||
|
@ -26,3 +26,31 @@ func Appmain() {
|
||||||
|
|
||||||
w.ShowAndRun()
|
w.ShowAndRun()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ppfApp struct {
|
||||||
|
Toolbar *fyne.Container
|
||||||
|
Metadata *fyne.Container
|
||||||
|
Extensions *fyne.Container
|
||||||
|
ContextBar *fyne.Container
|
||||||
|
Workarea *fyne.Container
|
||||||
|
Settings map[string]string
|
||||||
|
ProtocolForging bool
|
||||||
|
}
|
||||||
|
|
||||||
|
var application ppfApp
|
||||||
|
|
||||||
|
func CreateApp() *fyne.Container {
|
||||||
|
|
||||||
|
return container.NewBorder(
|
||||||
|
application.Toolbar,
|
||||||
|
application.Metadata,
|
||||||
|
application.ContextBar,
|
||||||
|
application.Extensions,
|
||||||
|
container.NewVScroll(application.Workarea),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateToolbar() *fyne.Container {
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"gitea.mmo.to/NetworkPacketComposer/npc"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
npc.Appmain()
|
|
||||||
}
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gitea.mmo.to/ProtocolPacketForger/ppf"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
ppf.Appmain()
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
func NewDataModel(name string) *DataModel {
|
func NewDataModel(name string) *DataModel {
|
||||||
return &DataModel{
|
return &DataModel{
|
||||||
|
@ -26,7 +26,7 @@ func (dm *DataModel) SaveNewProtocol(editorContent ProtocolEditor) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dm *DataModel) GetPackageEditor() *PackageEditor {
|
func (dm *DataModel) GetPacketEditor() *PacketEditor {
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ func (dm *DataModel) SwitchToProtocolEditor() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dm *DataModel) SyncPackageEditor(pkgedt *PackageEditor) {
|
func (dm *DataModel) SyncPacketEditor(pkgedt *PacketEditor) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import "fyne.io/fyne/v2/widget"
|
import "fyne.io/fyne/v2/widget"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
package npc
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"fyne.io/fyne/v2"
|
|
||||||
"fyne.io/fyne/v2/test"
|
|
||||||
"fyne.io/fyne/v2/widget"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestFlowLayout_Simple(t *testing.T) {
|
|
||||||
//padding := theme.Padding()
|
|
||||||
objs := []fyne.CanvasObject{
|
|
||||||
widget.NewLabel("Hello World"),
|
|
||||||
}
|
|
||||||
layout := NewFlowLayout(objs...)
|
|
||||||
win := test.NewWindow(layout)
|
|
||||||
defer win.Close()
|
|
||||||
|
|
||||||
win.Resize(fyne.NewSize(200, 200))
|
|
||||||
size := layout.Size()
|
|
||||||
fmt.Printf("%v", size)
|
|
||||||
}
|
|
3
go.mod
3
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module gitea.mmo.to/NetworkPacketComposer/npc
|
module gitea.mmo.to/ProtocolPacketForger/ppf
|
||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ require (
|
||||||
github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff // indirect
|
github.com/goki/freetype v0.0.0-20181231101311-fa8a33aabaff // indirect
|
||||||
github.com/gopherjs/gopherjs v1.17.2 // indirect
|
github.com/gopherjs/gopherjs v1.17.2 // indirect
|
||||||
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
|
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 // indirect
|
github.com/srwiley/oksvg v0.0.0-20200311192757-870daf9aa564 // indirect
|
||||||
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 // indirect
|
github.com/srwiley/rasterx v0.0.0-20200120212402-85cb7272f5e9 // indirect
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -207,8 +207,6 @@ 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/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
|
||||||
github.com/lucor/goinfo v0.0.0-20210802170112-c078a2b0f08b/go.mod h1:PRq09yoB+Q2OJReAmwzKivcYyremnibWGbK7WfftHzc=
|
github.com/lucor/goinfo v0.0.0-20210802170112-c078a2b0f08b/go.mod h1:PRq09yoB+Q2OJReAmwzKivcYyremnibWGbK7WfftHzc=
|
||||||
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import "fyne.io/fyne/v2"
|
import "fyne.io/fyne/v2"
|
||||||
|
|
||||||
type PackageEditor struct {
|
type PacketEditor struct {
|
||||||
Representation *fyne.Container
|
Representation *fyne.Container
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package npc
|
package ppf
|
||||||
|
|
||||||
type Field struct {
|
type Field struct {
|
||||||
Name string // Name of the Field
|
Name string // Name of the Field
|
||||||
|
|
Loading…
Reference in New Issue