func MakeHouseEditorPanel() Editor { var he HouseEditor he.house = *MakeHouseDef() he.HorizontalTable = gui.MakeHorizontalTable() he.viewer = MakeHouseViewer(&he.house, 62) he.viewer.Edit_mode = true he.HorizontalTable.AddChild(he.viewer) he.widgets = append(he.widgets, makeHouseDataTab(&he.house, he.viewer)) he.widgets = append(he.widgets, makeHouseDoorTab(&he.house, he.viewer)) he.widgets = append(he.widgets, makeHouseRelicsTab(&he.house, he.viewer)) var tabs []gui.Widget for _, w := range he.widgets { tabs = append(tabs, w.(gui.Widget)) } he.tab = gui.MakeTabFrame(tabs) he.HorizontalTable.AddChild(he.tab) return &he }
func MakeRoomEditorPanel() Editor { var rep RoomEditorPanel rep.HorizontalTable = gui.MakeHorizontalTable() rep.viewer = MakeRoomViewer(&rep.room, 65) rep.AddChild(rep.viewer) var tabs []gui.Widget rep.panels.furniture = makeFurniturePanel(&rep.room, rep.viewer) tabs = append(tabs, rep.panels.furniture) rep.widgets = append(rep.widgets, rep.panels.furniture) rep.panels.wall = MakeWallPanel(&rep.room, rep.viewer) tabs = append(tabs, rep.panels.wall) rep.widgets = append(rep.widgets, rep.panels.wall) rep.tab = gui.MakeTabFrame(tabs) rep.AddChild(rep.tab) rep.viewer.SetEditMode(editFurniture) return &rep }