generated from maximegris/angular-electron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing up a lot of things with mech summary and adding settings
- Loading branch information
1 parent
84f18df
commit 20f6fa8
Showing
38 changed files
with
2,358 additions
and
2,348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"flag" | ||
"log" | ||
"os" | ||
|
||
"gioui.org/app" | ||
"gioui.org/unit" | ||
|
||
"github.com/trevinteacutter/mwo-helper/internal/cmd/prototype" | ||
) | ||
|
||
func main() { | ||
flag.Parse() | ||
|
||
go func() { | ||
window := app.NewWindow( | ||
app.Title("MWNext Prototype"), | ||
app.Size(unit.Dp(1280), unit.Dp(720)), | ||
) | ||
|
||
if err := helper.Loop(window); err != nil { | ||
log.Panic(err) | ||
} | ||
|
||
os.Exit(0) | ||
}() | ||
|
||
app.Main() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package helper | ||
|
||
import ( | ||
"gioui.org/app" | ||
"gioui.org/font/gofont" | ||
"gioui.org/io/system" | ||
"gioui.org/layout" | ||
"gioui.org/op" | ||
"gioui.org/text" | ||
"gioui.org/widget/material" | ||
|
||
"github.com/trevinteacutter/mwo-helper/pkg/prototype" | ||
) | ||
|
||
func Loop(window *app.Window) error { | ||
// database := Load() | ||
// | ||
// defer database.Close() | ||
|
||
theme := material.NewTheme() | ||
theme.Shaper = text.NewShaper(text.WithCollection(gofont.Collection())) | ||
|
||
var ops op.Ops | ||
|
||
ui := prototype.New() | ||
|
||
for { | ||
switch event := window.NextEvent().(type) { | ||
case system.DestroyEvent: | ||
return event.Err | ||
case system.FrameEvent: | ||
gtx := layout.NewContext(&ops, event) | ||
|
||
ui.Layout(gtx, theme) | ||
event.Frame(gtx.Ops) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.