Skip to content

Commit

Permalink
Simplify Msgbox and provide advance usage by MsgboxV.
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDang committed Mar 26, 2020
1 parent ec73913 commit bbce939
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Msgbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ func PrepareMsgbox() Layout {
}
}

func Msgbox(title, content string, buttons MsgboxButtons, resultCallback func(DialogResult)) {
func Msgbox(title, content string) {
MsgboxV(title, content, MsgboxButtonsOk, nil)
}

func MsgboxV(title, content string, buttons MsgboxButtons, resultCallback func(DialogResult)) {
stateRaw := Context.GetState(msgboxId)
if stateRaw == nil {
fmt.Println("Msgbox is not prepared. Invoke giu.PrepareMsgbox in the end of the layout.")
Expand Down

0 comments on commit bbce939

Please sign in to comment.