You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TextColour: color.RGBA{255, 255, 255, 255}, // White text
18
+
BackgroundColour: color.RGBA{0, 0, 255, 255}, // Green background
19
+
FontName: "consolab.ttf", // Bold Consolas font
20
+
FontSize: 20, // Font size for single character
21
+
SmallFontSize: 14, // Font size for multiple characters
22
+
}
14
23
15
-
This will start your application and enable hot-reloading for both frontend and backend changes.
24
+
badgeService:= badge.NewWithOptions(options)
16
25
17
-
3. To build your application for production, use:
26
+
// Register the service with the application
27
+
app:= application.New(application.Options{
28
+
Services: []application.Service{
29
+
application.NewService(badgeService),
30
+
},
31
+
})
32
+
```
18
33
19
-
```
20
-
wails3 build
21
-
```
34
+
## Badge Operations
22
35
23
-
This will create a production-ready executable in the `build` directory.
36
+
### Setting a Badge
24
37
25
-
## Exploring Wails3 Features
38
+
Set a badge on the application tile/dock icon:
26
39
27
-
Now that you have your project set up, it's time to explore the features that Wails3 offers:
40
+
**Go**
41
+
```go
42
+
// Set a default badge
43
+
badgeService.SetBadge("")
28
44
29
-
1.**Check out the examples**: The best way to learn is by example. Visit the `examples` directory in the `v3/examples` directory to see various sample applications.
45
+
// Set a numeric badge
46
+
badgeService.SetBadge("3")
30
47
31
-
2.**Run an example**: To run any of the examples, navigate to the example's directory and use:
Note: Some examples may be under development during the alpha phase.
56
+
// Set a default badge
57
+
SetBadge("")
38
58
39
-
3.**Explore the documentation**: Visit the [Wails3 documentation](https://v3.wails.io/) for in-depth guides and API references.
59
+
// Set a numeric badge
60
+
SetBadge("3")
40
61
41
-
4.**Join the community**: Have questions or want to share your progress? Join the [Wails Discord](https://discord.gg/JDdSxwjhGf) or visit the [Wails discussions on GitHub](https://github.com/wailsapp/wails/discussions).
62
+
// Set a text badge
63
+
SetBadge("New")
64
+
```
42
65
43
-
##Project Structure
66
+
### Removing a Badge
44
67
45
-
Take a moment to familiarize yourself with your project structure:
68
+
Remove the badge from the application icon:
46
69
47
-
-`frontend/`: Contains your frontend code (HTML, CSS, JavaScript/TypeScript)
48
-
-`main.go`: The entry point of your Go backend
49
-
-`app.go`: Define your application structure and methods here
50
-
-`wails.json`: Configuration file for your Wails project
1. Modify the frontend in the `frontend/` directory to create your desired UI.
55
-
2. Add backend functionality in `main.go`.
56
-
3. Use `wails3 dev` to see your changes in real-time.
57
-
4. When ready, build your application with `wails3 build`.
58
-
59
-
Happy coding with Wails3! If you encounter any issues or have questions, don't hesitate to consult the documentation or reach out to the Wails community.
0 commit comments