@@ -242,7 +242,7 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false)
242242 ImGuiEx . Tooltip ( "Fixed angle mode. Face fixed angle." ) ;
243243 ImGui . SameLine ( ) ;
244244 if ( ! el . RotationOverrideAngleOnlyMode )
245- {
245+ {
246246 ImGuiEx . TextV ( "Rotate towards:" ) ;
247247 ImGui . SameLine ( ) ;
248248 ImGuiEx . Text ( $ "X:") ;
@@ -462,6 +462,83 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false)
462462 ImGui . SetNextItemWidth ( 200f ) ;
463463 ImGuiEx . EnumCombo ( "##alter" , ref el . TargetAlteration ) ;
464464
465+ if ( el . refActorType == 0 )
466+ {
467+ ImGuiUtils . SizedText ( "Enumeration:" . Loc ( ) , WidthElement ) ;
468+ ImGui . SameLine ( ) ;
469+ ImGui . SetNextItemWidth ( 200f ) ;
470+ ImGuiEx . EnumCombo ( "##enumerate" , ref el . Enumeration ) ;
471+ if ( el . Enumeration != EnumerationType . None )
472+ {
473+ ImGuiUtils . SizedText ( "Center:" . Loc ( ) , WidthElement ) ;
474+ ImGui . SameLine ( ) ;
475+ ImGuiEx . Text ( $ "X:") ;
476+ ImGui . SameLine ( ) ;
477+ ImGui . SetNextItemWidth ( 50f ) ;
478+ ImGui . DragFloat ( "##enumCx" , ref el . EnumerationCenter . X , 0.1f ) ;
479+ ImGui . SameLine ( ) ;
480+ ImGuiEx . Text ( $ "Y:") ;
481+ ImGui . SameLine ( ) ;
482+ ImGui . SetNextItemWidth ( 50f ) ;
483+ ImGui . DragFloat ( "##enumCy" , ref el . EnumerationCenter . Y , 0.1f ) ;
484+
485+ ImGuiUtils . SizedText ( "Starting Position:" . Loc ( ) , WidthElement ) ;
486+ ImGui . SameLine ( ) ;
487+ ImGuiEx . Text ( $ "X:") ;
488+ ImGui . SameLine ( ) ;
489+ ImGui . SetNextItemWidth ( 50f ) ;
490+ ImGui . DragFloat ( "##enumSx" , ref el . EnumerationStart . X , 0.1f ) ;
491+ ImGui . SameLine ( ) ;
492+ ImGuiEx . Text ( $ "Y:") ;
493+ ImGui . SameLine ( ) ;
494+ ImGui . SetNextItemWidth ( 50f ) ;
495+ ImGui . DragFloat ( "##enumSy" , ref el . EnumerationStart . Y , 0.1f ) ;
496+ }
497+ ImGuiUtils . SizedText ( "Enumeration Positions:" . Loc ( ) , WidthElement ) ;
498+ ImGui . SameLine ( ) ;
499+ ImGuiEx . SetNextItemFullWidth ( ) ;
500+ if ( ImGui . BeginCombo ( $ "##positions", el . EnumerationOrder . Count == 0 ? "Enter Enumeration Positions" . Loc ( ) : $ "{ el . EnumerationOrder . Print ( ) } ", ImGuiComboFlags . HeightLarge ) )
501+ {
502+ ref var inp = ref Ref < int > . Get ( "EnumerationInput" ) ;
503+ ImGui . SetNextItemWidth ( 150f ) ;
504+ ImGui . InputInt ( "Add Position" , ref inp ) ;
505+ ImGui . SameLine ( ) ;
506+ if ( ImGuiEx . IconButtonWithText ( FontAwesomeIcon . Plus , "Add" ) )
507+ {
508+ if ( inp == 0 )
509+ {
510+ Notify . Error ( "Enumeration starts with 1 or -1" ) ;
511+ }
512+ else if ( el . EnumerationOrder . Contains ( inp ) )
513+ {
514+ Notify . Error ( "This value is already added" ) ;
515+ }
516+ else
517+ {
518+ el . EnumerationOrder . Add ( inp ) ;
519+ el . EnumerationOrder . Sort ( ) ;
520+ inp = 0 ;
521+ }
522+ }
523+ if ( ImGuiEx . BeginDefaultTable ( "EnumTable" , [ "Point" , "Func" ] , drawHeader : false ) )
524+ {
525+ foreach ( var x in el . EnumerationOrder )
526+ {
527+ ImGui . TableNextRow ( ) ;
528+ ImGui . TableNextColumn ( ) ;
529+ ImGuiEx . Text ( $ "{ x } ") ;
530+ ImGui . TableNextColumn ( ) ;
531+ if ( ImGuiEx . SmallIconButton ( FontAwesomeIcon . Trash , $ "Del{ x } ") )
532+ {
533+ new TickScheduler ( ( ) => el . EnumerationOrder . Remove ( x ) ) ;
534+ }
535+ }
536+ ImGui . EndTable ( ) ;
537+ }
538+ ImGui . EndCombo ( ) ;
539+ }
540+ }
541+
465542 ImGuiUtils . SizedText ( "Targetability: " . Loc ( ) , WidthElement ) ;
466543 ImGui . SameLine ( ) ;
467544 ImGui . SetNextItemWidth ( 100f ) ;
@@ -552,7 +629,7 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false)
552629 foreach ( var x in Svc . Objects . OfType < IBattleNpc > ( ) . Where ( x => x . IsCasting ( ) ) )
553630 {
554631 ImGui . PushID ( i ++ ) ;
555- if ( ImGui . Selectable ( $ "{ ExcelActionHelper . GetActionName ( x . CastActionId , true ) } - { x . CurrentCastTime : F1} /{ x . TotalCastTime : F1} - from { x . Name } N#{ x . NameId } D#{ x . DataId } ", selected : el . refActorCastId . Contains ( x . CastActionId ) , flags : ImGuiSelectableFlags . DontClosePopups ) )
632+ if ( ImGui . Selectable ( $ "{ ExcelActionHelper . GetActionName ( x . CastActionId , true ) } - { x . CurrentCastTime : F1} /{ x . TotalCastTime : F1} - from { x . Name } N#{ x . NameId } D#{ x . DataId } ", selected : el . refActorCastId . Contains ( x . CastActionId ) , flags : ImGuiSelectableFlags . DontClosePopups ) )
556633 {
557634 if ( ImGuiEx . Shift ) el . refActorCastId . Clear ( ) ;
558635 el . refActorCastId . Toggle ( x . CastActionId ) ;
@@ -605,9 +682,24 @@ internal void LayoutDrawElement(Layout l, Element el, bool forceEnable = false)
605682 ImGui . Checkbox ( "Overcast" . Loc ( ) , ref el . refActorUseOvercast ) ;
606683 ImGuiComponents . HelpMarker ( "Enable use of cast values that exceed cast time, effectively behaving like cast bar would continue to be displayed after cast already happened" . Loc ( ) ) ;
607684 }
685+ if ( el . includeRotation && ! el . RotationOverride )
686+ {
687+ ImGuiUtils . SizedText ( "" , WidthElement ) ;
688+ ImGui . SameLine ( ) ;
689+ ImGui . Checkbox ( "Derive rotation from cast info" , ref el . UseCastRotation ) ;
690+ }
691+ /*
692+ ImGuiUtils.SizedText("", WidthElement);
693+ ImGui.SameLine();
694+ ImGui.Checkbox("Derive position from cast info", ref el.UseCastPosition);
695+ if(el.TargetAlteration != TargetAlteration.None)
696+ {
697+ ImGuiUtils.SizedText("", WidthElement);
698+ ImGui.SameLine();
699+ ImGui.Checkbox("Draw elements on cast targets", ref el.UseCastTarget);
700+ }*/
608701 }
609-
610- ImGuiUtils . SizedText ( "Status requirement:" . Loc ( ) , WidthElement ) ;
702+ ImGuiUtils . SizedText ( "Status requirement:" . Loc ( ) , WidthElement ) ;
611703 ImGui . SameLine ( ) ;
612704 ImGui . Checkbox ( "##buffreq" , ref el . refActorRequireBuff ) ;
613705 if ( el . refActorRequireBuff )
0 commit comments