Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 16:18:48 -04:00
1 parent 5a7e921c7e
commit 22b53e9e9e
1822 files changed
+24568 -21314

No files matched your search

+5 -4
View File
@@ -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)
}
})