Skip to content

Commit

Permalink
Merge pull request #174 from robofit/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
Kapim authored Oct 5, 2020
2 parents df4ae14 + 7e1b67c commit ece3d3b
Show file tree
Hide file tree
Showing 37 changed files with 2,328 additions and 739 deletions.
114 changes: 53 additions & 61 deletions arcor2_AREditor/Assets/2D_EDITOR/Prefabs/Menus/ActionPointMenu.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -358,6 +359,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -615,6 +617,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -689,6 +692,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand All @@ -714,21 +718,22 @@ MonoBehaviour:
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 60
m_fontSizeBase: 28
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 30
m_fontSizeMax: 60
m_fontStyle: 0
m_textAlignment: 513
m_HorizontalAlignment: 1
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
Expand All @@ -738,51 +743,27 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 3
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 4729252619958538671}
characterCount: 15
spriteCount: 0
spaceCount: 0
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!114 &2874914750832154295
Expand Down Expand Up @@ -1224,6 +1205,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand All @@ -1248,21 +1230,22 @@ MonoBehaviour:
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_outlineColor:
serializedVersion: 2
rgba: 4278190080
m_fontSize: 30
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 30
m_fontStyle: 0
m_textAlignment: 258
m_HorizontalAlignment: 2
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
Expand All @@ -1272,51 +1255,27 @@ MonoBehaviour:
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_firstOverflowCharacterIndex: -1
m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0
m_isTextTruncated: 0
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_ignoreRectMaskCulling: 0
m_ignoreCulling: 1
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 1
m_firstVisibleCharacter: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 3964320881153009974}
characterCount: 8
spriteCount: 0
spaceCount: 1
wordCount: 2
linkCount: 0
lineCount: 1
pageCount: 1
materialCount: 1
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_spriteAnimator: {fileID: 0}
m_hasFontAssetChanged: 0
m_subTextObjects:
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8602247600040030491
Expand Down Expand Up @@ -1420,6 +1379,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -1664,6 +1624,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -1757,6 +1718,7 @@ MonoBehaviour:
RemoveBtn: {fileID: 5568830578763968615}
CollapseBtn: {fileID: 3661571056954466465}
ExpandBtn: {fileID: 3115351802545279504}
AimingBtn: {fileID: 1196432903891011911}
inputDialog: {fileID: 0}
ActionPointAimingMenu: {fileID: 0}
--- !u!1 &8970925155946651209
Expand Down Expand Up @@ -1820,6 +1782,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -1936,6 +1899,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -2013,6 +1977,7 @@ MonoBehaviour:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.09803922}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
Expand Down Expand Up @@ -2174,7 +2139,7 @@ PrefabInstance:
value: 0.5
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 5888559990071933526, guid: a37f66d2914458b4c85e50f9fa33cf93, type: 3}
- {fileID: 0}
m_SourcePrefab: {fileID: 100100000, guid: a37f66d2914458b4c85e50f9fa33cf93, type: 3}
--- !u!114 &5568830578763968615 stripped
MonoBehaviour:
Expand Down Expand Up @@ -2602,6 +2567,11 @@ PrefabInstance:
propertyPath: m_Name
value: Focus
objectReference: {fileID: 0}
- target: {fileID: 2685198304057975679, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: description
value: AP locked
objectReference: {fileID: 0}
- target: {fileID: 3750091178015956156, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: description
Expand All @@ -2612,6 +2582,11 @@ PrefabInstance:
propertyPath: Description
value: Open aiming menu
objectReference: {fileID: 0}
- target: {fileID: 3750091178015956156, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: DescriptionAlternative
value: AP locked
objectReference: {fileID: 0}
- target: {fileID: 4991226775622563084, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
Expand All @@ -2627,6 +2602,11 @@ PrefabInstance:
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4991226775622563084, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: m_Interactable
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7710050843114423662, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
propertyPath: m_LocalPosition.x
Expand Down Expand Up @@ -2755,6 +2735,18 @@ PrefabInstance:
type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a37f66d2914458b4c85e50f9fa33cf93, type: 3}
--- !u!114 &1196432903891011911 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6290073754276278303, guid: a37f66d2914458b4c85e50f9fa33cf93,
type: 3}
m_PrefabInstance: {fileID: 5174708143617636696}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c51c72ffdfd9174788c173c64918514, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &3256062706120080438 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7710050843114423662, guid: a37f66d2914458b4c85e50f9fa33cf93,
Expand Down
4 changes: 3 additions & 1 deletion arcor2_AREditor/Assets/2D_EDITOR/Scripts/ActionPointMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class ActionPointMenu : MonoBehaviour, IMenu {
private Button LockedBtn, UnlockedBtn, UntieBtn, BackBtn;

[SerializeField]
private ButtonWithTooltip RemoveBtn, CollapseBtn, ExpandBtn;
private ButtonWithTooltip RemoveBtn, CollapseBtn, ExpandBtn, AimingBtn;

[SerializeField]
private InputDialog inputDialog;
Expand Down Expand Up @@ -166,6 +166,7 @@ public async void UpdateMenu() {
}
ExpandBtn.gameObject.SetActive(CurrentActionPoint.ActionsCollapsed);
CollapseBtn.gameObject.SetActive(!CurrentActionPoint.ActionsCollapsed);

}

private static void CreateTooltip(string text, ActionButton btn) {
Expand Down Expand Up @@ -240,6 +241,7 @@ public void SetHeader(string header) {
public void UpdateLockedBtns(bool locked) {
LockedBtn.gameObject.SetActive(locked);
UnlockedBtn.gameObject.SetActive(!locked);
AimingBtn.SetInteractivity(!locked);
}

public void SetLocked(bool locked) {
Expand Down
9 changes: 5 additions & 4 deletions arcor2_AREditor/Assets/2D_EDITOR/Scripts/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void Start() {
Base.GameManager.Instance.OnDisconnectedFromServer += OnOpenDisconnectedScreen;
Base.SceneManager.Instance.OnSceneSavedStatusChanged += OnSceneOrProjectSavedStatusChanged;
Base.ProjectManager.Instance.OnProjectSavedSatusChanged += OnSceneOrProjectSavedStatusChanged;
Base.WebsocketManager.Instance.OnSceneStateEvent += OnSceneStateEvent;
Base.SceneManager.Instance.OnSceneStateEvent += OnSceneStateEvent;


HideEverything();
Expand Down Expand Up @@ -175,7 +175,8 @@ private void ActionObjectsUpdated(object sender, Base.StringEventArgs eventArgs)
orderedList.Sort(
delegate (ActionObjectMetadata obj1,
ActionObjectMetadata obj2) {
return obj2.Type.CompareTo(obj1.Type);
return obj2.Type.CompareTo(obj1
.Type);
}
);
foreach (Base.ActionObjectMetadata actionObjectMetadata in orderedList) {
Expand Down Expand Up @@ -383,7 +384,6 @@ public async void SaveScene() {
SaveSceneBtn.SetInteractivity(false, "There are no unsaved changes");
_ = UpdateBuildAndSaveBtns();
}
Notifications.Instance.ShowNotification("Scene save sucessfull", "");
}

public async void SaveProject() {
Expand All @@ -392,7 +392,7 @@ public async void SaveProject() {
saveProjectResponse.Messages.ForEach(Debug.LogError);
Base.Notifications.Instance.ShowNotification("Failed to save project", (saveProjectResponse.Messages.Count > 0 ? ": " + saveProjectResponse.Messages[0] : ""));
return;
}
}
}


Expand All @@ -410,6 +410,7 @@ public async void BuildPackage(string name) {
try {
await Base.GameManager.Instance.BuildPackage(name);
inputDialog.Close();
Notifications.Instance.ShowToastMessage("Package was built sucessfully.");
} catch (Base.RequestFailedException ex) {

}
Expand Down
Loading

0 comments on commit ece3d3b

Please sign in to comment.