Compare commits
No commits in common. "192e6c6235aababedaeed1605018fd65c98fac0a" and "fad46eafd3c7c00711f61e9be30e15b171acbacf" have entirely different histories.
192e6c6235
...
fad46eafd3
@ -287,26 +287,13 @@ func (this *Hierarchy) considerMaskingParents (box anyBox) anyBox {
|
||||
return box
|
||||
}
|
||||
|
||||
func (this *Hierarchy) isMasked (box anyBox) bool {
|
||||
parent := box.getParent()
|
||||
for {
|
||||
parentBox, ok := parent.(anyBox)
|
||||
if !ok { break }
|
||||
if parent.masks() {
|
||||
return true
|
||||
}
|
||||
parent = parentBox.getParent()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (this *Hierarchy) focusNext () {
|
||||
found := !this.anyFocused()
|
||||
focused := false
|
||||
this.propagateAlt(func (box anyBox) bool {
|
||||
if found {
|
||||
// looking for the next box to select
|
||||
if box.canBeFocused() && !this.isMasked(box) {
|
||||
if box.canBeFocused() {
|
||||
// found it
|
||||
this.focus(box)
|
||||
focused = true
|
||||
@ -331,7 +318,7 @@ func (this *Hierarchy) focusPrevious () {
|
||||
if box == this.focused {
|
||||
return false
|
||||
}
|
||||
if box.canBeFocused() && !this.isMasked(box) { behind = box }
|
||||
if box.canBeFocused() { behind = box }
|
||||
return true
|
||||
})
|
||||
this.focus(behind)
|
||||
|
@ -290,7 +290,7 @@ func (this *textBox) runeUnderMouse () int {
|
||||
|
||||
func (this *textBox) handleKeyDown (key input.Key, numberPad bool) bool {
|
||||
if this.box.handleKeyDown(key, numberPad) { return true }
|
||||
if !this.selectable { return false }
|
||||
if this.selectable { return false }
|
||||
|
||||
// because fuck you thats why!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
modifiers := this.Window().Modifiers()
|
||||
@ -334,7 +334,7 @@ func (this *textBox) handleKeyDown (key input.Key, numberPad bool) bool {
|
||||
|
||||
func (this *textBox) handleKeyUp (key input.Key, numberPad bool) bool {
|
||||
if this.box.handleKeyUp(key, numberPad) { return true }
|
||||
if !this.selectable { return false }
|
||||
if this.selectable { return false }
|
||||
|
||||
modifiers := this.Window().Modifiers()
|
||||
switch {
|
||||
|
Loading…
Reference in New Issue
Block a user