Skip to content

Commit

Permalink
Renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Apr 29, 2024
1 parent 6c70529 commit 644f9b9
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/game/ui/UiGroupController.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ class UiGroupController extends dn.Process {
var current : Null<UiComponent>;

var components : Array<UiComponent> = [];

var connectionsNeedRebuild = false;
var uiGroupsConnections : Map<GroupDir, UiGroupController> = new Map();
var componentsConnections : Map<Int, Map<GroupDir, UiComponent>> = new Map();

var focused = true;
var groupFocused = true;
var useMouse : Bool;


Expand All @@ -31,7 +32,7 @@ class UiGroupController extends dn.Process {

uid = UID++;
ca = App.ME.controller.createAccess();
ca.lockCondition = ()->!focused || customControllerLock();
ca.lockCondition = ()->!groupFocused || customControllerLock();
ca.lock(0.1);
}

Expand Down Expand Up @@ -67,22 +68,22 @@ class UiGroupController extends dn.Process {


public function focusGroup() {
var wasFocus = focused;
focused = true;
var wasFocused = groupFocused;
groupFocused = true;
ca.lock(0.2);
blurAllConnectedGroups();
if( !wasFocus )
if( !wasFocused )
onGroupFocus();
}

public function blurGroup() {
var wasFocus = focused;
focused = false;
var wasFocused = groupFocused;
groupFocused = false;
if( current!=null ) {
current.onBlur();
current = null;
}
if( wasFocus )
if( wasFocused )
onGroupBlur();
}

Expand Down Expand Up @@ -391,15 +392,15 @@ class UiGroupController extends dn.Process {
if( symetric )
targetGroup.connectGroup(getOppositeDir(dir), this, false);

if( focused )
if( groupFocused )
blurAllConnectedGroups();
}


override function preUpdate() {
super.preUpdate();

if( !focused )
if( !groupFocused )
return;

// Build components connections
Expand Down

0 comments on commit 644f9b9

Please sign in to comment.