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

refactoring project #64

Merged
merged 16 commits into from
Oct 12, 2023
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
- Adding `Focus()` method to `Window` to focus the window via API.
- Restructure Pixel Project
- Converted `imdraw` and `text` packages to `plugins`
- moved all `*_test.go` files to `test` package

## [v1.0.0](https://github.com/gopxl/pixel/v2/compare/v1.0.0...dev)
- Multiple Window Management Framework
Expand Down
Empty file added backends/opengl/.init
dusk125 marked this conversation as resolved.
Show resolved Hide resolved
duysqubix marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
Empty file added backends/sdl/.init
duysqubix marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
Empty file added backends/vulcan/.init
duysqubix marked this conversation as resolved.
Show resolved Hide resolved
Empty file.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b
github.com/go-gl/mathgl v1.1.0
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/gopxl/glhf/v2 v2.0.0-20231011010357-90c5b7c2543d
github.com/gopxl/glhf/v2 v2.0.0
duysqubix marked this conversation as resolved.
Show resolved Hide resolved
github.com/gopxl/mainthread/v2 v2.0.0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.8.4
Expand All @@ -17,5 +17,6 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
bhperry marked this conversation as resolved.
Show resolved Hide resolved
gopkg.in/yaml.v3 v3.0.1 // indirect
)
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 h1:zDw5v7qm4yH7N8C8uWd+8Ii9rROdgWxQuGoJ9WDXxfk=
Expand All @@ -12,6 +13,8 @@ github.com/gopxl/glhf/v2 v2.0.0-20231010004459-fc58b4a8f7d0 h1:QCfBCpS1GprFdtyKy
github.com/gopxl/glhf/v2 v2.0.0-20231010004459-fc58b4a8f7d0/go.mod h1:2TW8DIqHAPiQhv6EAXThEA/fgl+Ky8Lgd3XevyJqmSY=
github.com/gopxl/glhf/v2 v2.0.0-20231011010357-90c5b7c2543d h1:DK2rpfmPeqdYlvdypfE5B7PTwkkKAAlCvzoBNZuwxWc=
github.com/gopxl/glhf/v2 v2.0.0-20231011010357-90c5b7c2543d/go.mod h1:InKwj5OoVdOAkpzsS0ILwpB+RrWBLw1i7aFefiGmrp8=
github.com/gopxl/glhf/v2 v2.0.0 h1:SJtNy+TXuTBRjMersNx722VDJ0XHIooMH2+7+99LPIc=
github.com/gopxl/glhf/v2 v2.0.0/go.mod h1:InKwj5OoVdOAkpzsS0ILwpB+RrWBLw1i7aFefiGmrp8=
github.com/gopxl/mainthread/v2 v2.0.0-20231010001939-73dfba06ae92 h1:+17VMm30TmRoIlA/S29R29A7Sqbak/6OLKjq6iX/I7U=
github.com/gopxl/mainthread/v2 v2.0.0-20231010001939-73dfba06ae92/go.mod h1:/uFQhUiSP53SSU/RQ5w0FFkljRArJlaQkDPza3zE2V8=
github.com/gopxl/mainthread/v2 v2.0.0 h1:jRbeWFzX6/UyhRab00xS3xIVYywBgc0DgwPgwS6EVYw=
Expand All @@ -20,6 +23,12 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
Expand All @@ -28,5 +37,6 @@ golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
File renamed without changes.
2 changes: 1 addition & 1 deletion imdraw/imdraw_test.go → plugins/imdraw/imdraw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/gopxl/pixel/v2"
"github.com/gopxl/pixel/v2/imdraw"
"github.com/gopxl/pixel/v2/plugins/imdraw"
)

func BenchmarkPush(b *testing.B) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion text/atlas_test.go → plugins/text/atlas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package text_test
import (
"testing"

"github.com/gopxl/pixel/v2/text"
"github.com/gopxl/pixel/v2/plugins/text"
"golang.org/x/image/font/inconsolata"
)

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions text/text_test.go → plugins/text/text_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"golang.org/x/image/font/basicfont"
"golang.org/x/image/font/gofont/goregular"

"github.com/gopxl/pixel/v2"
"github.com/gopxl/pixel/v2/text"
"github.com/golang/freetype/truetype"
"github.com/gopxl/pixel/v2"
"github.com/gopxl/pixel/v2/plugins/text"
)

func TestClear(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.