Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI
This commit is contained in:
1822 files changed
+24568
-21314
No files matched your search
@@ -6,16 +6,17 @@ import (
|
||||
"github.com/egoist/mygo"
|
||||
"github.com/egoist/mygo/ui"
|
||||
|
||||
mujica "mujicaui"
|
||||
"github.com/ZacharyZhang-NY/MujicaUI/core"
|
||||
"github.com/ZacharyZhang-NY/MujicaUI/input"
|
||||
)
|
||||
|
||||
type app struct{ name string }
|
||||
|
||||
func (a *app) view(c *ui.Context) {
|
||||
mujica.Use(c, mujica.Settings{Locale: mujica.ZhCN})
|
||||
core.Use(c, core.Settings{Locale: core.ZhCN})
|
||||
ui.Column(c).Fill().Center().Gap(12).Children(func() {
|
||||
mujica.TextInput(c, &a.name, mujica.TextInputOptions{Placeholder: "姓名"})
|
||||
if mujica.Button(c, "觐见", mujica.ButtonOptions{}).Clicked() {
|
||||
input.TextInput(c, &a.name, input.TextInputOptions{Placeholder: "姓名"})
|
||||
if input.Button(c, "觐见", input.ButtonOptions{}).Clicked() {
|
||||
log.Println("hello", a.name)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user