설비 KPI 기능 및 디자인 수정
This commit is contained in:
BIN
Assets/Images/UI/MachineKPI/UI 클릭 전 (1).png
Normal file
BIN
Assets/Images/UI/MachineKPI/UI 클릭 전 (1).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
117
Assets/Images/UI/MachineKPI/UI 클릭 전 (1).png.meta
Normal file
117
Assets/Images/UI/MachineKPI/UI 클릭 전 (1).png.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b52c4d661dc79e9428c98ae5abb0f014
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Images/UI/MachineKPI/UI 클릭 전.png
Normal file
BIN
Assets/Images/UI/MachineKPI/UI 클릭 전.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
117
Assets/Images/UI/MachineKPI/UI 클릭 전.png.meta
Normal file
117
Assets/Images/UI/MachineKPI/UI 클릭 전.png.meta
Normal file
@@ -0,0 +1,117 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bfe87db4b859ff640806fc73a835437d
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e141f06dfd5f2864f9d29d974eba33d6
|
||||
guid: b7cf93940b697c742969b69243ce4db3
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
2437
Assets/Resources/Prefabs/UI/PRF_UI_MachineKPI_2.prefab
Normal file
2437
Assets/Resources/Prefabs/UI/PRF_UI_MachineKPI_2.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e141f06dfd5f2864f9d29d974eba33d6
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
@@ -10,11 +10,18 @@ using static MQTT;
|
||||
using CHN;
|
||||
using System.Globalization;
|
||||
|
||||
public class UI_MachineKPI : UIBase, IPointerClickHandler
|
||||
public class UI_MachineKPI : UIBase, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
public SimpleField data;
|
||||
|
||||
private TextMeshProUGUI MachineName;
|
||||
public RectTransform Default_KPI;
|
||||
private RectTransform Expand_KPI;
|
||||
|
||||
private TextMeshProUGUI DefaultMachineName;
|
||||
private TextMeshProUGUI ExpandMachineName;
|
||||
private Image Default_Status;
|
||||
private Image Expand_Status;
|
||||
|
||||
private TextMeshProUGUI eorate;
|
||||
private TextMeshProUGUI daynight;
|
||||
private TextMeshProUGUI workcd;
|
||||
@@ -36,9 +43,31 @@ public class UI_MachineKPI : UIBase, IPointerClickHandler
|
||||
workcd.SetText(data.machineInfo.workcd);
|
||||
goodqtyrate.SetText(DecimalPointCalculate(data.kpiDataInfo.goodqtyrate).ToString() + "%");
|
||||
porate.SetText(DecimalPointCalculate(data.kpiDataInfo.porate).ToString() +"%");
|
||||
workdt.SetText(CorrectionTime(data.machineInfo.workdt, "yyyy-MM-dd"));
|
||||
|
||||
var workdate = CorrectionTime(data.machineInfo.workdt, "yyyy-MM-dd");
|
||||
MachineName.SetText(ApplyDualFont(data.machineInfo.worknm, workdate, secondaryFontName));
|
||||
DefaultMachineName.SetText(data.machineInfo.worknm);
|
||||
ExpandMachineName.SetText(data.machineInfo.worknm);
|
||||
|
||||
Default_Status.color = SetStatusColor(data.machineInfo.statusnm);
|
||||
Expand_Status.color = SetStatusColor(data.machineInfo.statusnm);
|
||||
}
|
||||
private Color SetStatusColor(string value)
|
||||
{
|
||||
var color = Color.white;
|
||||
|
||||
switch (value)
|
||||
{
|
||||
case "°¡µ¿Áß":
|
||||
color = Color.green;
|
||||
break;
|
||||
case "ºñ°¡µ¿":
|
||||
color = Color.red;
|
||||
break;
|
||||
default:
|
||||
color = Color.yellow;
|
||||
break;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
private bool CheckDataExists(string value)
|
||||
{
|
||||
@@ -62,16 +91,12 @@ public class UI_MachineKPI : UIBase, IPointerClickHandler
|
||||
}
|
||||
private string CorrectionTime(string value, string dateForm)
|
||||
{
|
||||
DateTime.TryParseExact(value, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var parsedDate);
|
||||
|
||||
return parsedDate.ToString(dateForm);
|
||||
}
|
||||
string ApplyDualFont(string originText, string addText, string fontName)
|
||||
{
|
||||
string result = originText;
|
||||
|
||||
result += $"<font=\"{fontName}\"><size=\"10f\">({addText})</size></font>";
|
||||
return result;
|
||||
if(DateTime.TryParseExact(value, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var parsedDate))
|
||||
{
|
||||
return parsedDate.ToString(dateForm);
|
||||
}
|
||||
return "----/--/--";
|
||||
|
||||
}
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
@@ -88,4 +113,30 @@ public class UI_MachineKPI : UIBase, IPointerClickHandler
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (!isExpand)
|
||||
{
|
||||
if (Expand_KPI == null && Default_KPI == null)
|
||||
return;
|
||||
|
||||
Expand_KPI.gameObject.SetActive(true);
|
||||
Default_KPI.gameObject.SetActive(false);
|
||||
|
||||
isExpand = true;
|
||||
|
||||
transform.SetAsLastSibling();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (isExpand)
|
||||
{
|
||||
Default_KPI.gameObject.SetActive(true);
|
||||
Expand_KPI.gameObject.SetActive(false);
|
||||
isExpand = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user