mirror of
https://github.com/bloeys/gopad.git
synced 2025-12-29 06:58:21 +00:00
Native windows open file dialog
This commit is contained in:
@ -109,7 +109,10 @@ func (e *Editor) UpdateAndDraw(drawStartPos, winSize *imgui.Vec2, newRunes []run
|
||||
imgui.PushStyleColorVec4(imgui.ColTextSelectedBg, settings.TextSelectionColor)
|
||||
|
||||
imgui.SetNextItemWidth(winSize.X)
|
||||
if imgui.InputTextMultiline("", &e.FileContents, imgui.Vec2{X: winSize.X - winSize.X*0.02, Y: winSize.Y - winSize.Y*0.02}, imgui.InputTextFlagsNone, nil) {
|
||||
|
||||
// We want different lables so multiple editors don't mess eaach other, but we don't want the label to show
|
||||
// so we prefix the whole thing with ##
|
||||
if imgui.InputTextMultiline("##"+e.FilePath, &e.FileContents, imgui.Vec2{X: winSize.X - winSize.X*0.02, Y: winSize.Y - winSize.Y*0.02}, imgui.InputTextFlagsNone|imgui.InputTextFlagsAllowTabInput, nil) {
|
||||
e.IsModified = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user