소스 검색

Make slider update on enable.

danaugrs 8 년 전
부모
커밋
4484681aba
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      gui/slider.go

+ 1 - 0
gui/slider.go

@@ -87,6 +87,7 @@ func newSlider(horiz bool, width, height float32) *Slider {
 	s.Panel.Subscribe(OnKeyDown, s.onKey)
 	s.Panel.Subscribe(OnKeyRepeat, s.onKey)
 	s.Panel.Subscribe(OnResize, s.onResize)
+	s.Panel.Subscribe(OnEnable, func(evname string, ev interface{}) { s.update() })
 
 	// Initialize slider panel
 	s.slider.Initialize(0, 0)