ZEP Guidebook (KR)
  • πŸ‘‹Hello ZEP Script
  • ZEP Script κ°€μ΄λ“œ
    • ZEP Script 개발 κ°€μ΄λ“œ
      • μ‰¬μš΄ 개발 κ°€μ΄λ“œ
      • Javascript 개발 κ°€μ΄λ“œ
      • Typescript 개발 κ°€μ΄λ“œ
      • ZEP Script 배포 κ°€μ΄λ“œ
    • ZEP Script λ”°λΌν•˜κΈ°
      • 기초 예제 μ½”λ“œ
        • βœ‰οΈλ©”μ‹œμ§€ 좜λ ₯해보기
        • ♻️ZEP APP lifecycle μ΄ν•΄ν•˜κΈ°
        • πŸ‘€μΊλ¦­ν„° 이미지 λ°”κΎΈκΈ°
        • πŸ–ΌοΈλ‚˜λ§Œμ˜ UI λ§Œλ“€κΈ°
        • πŸ’’2초 μŠ€ν„΄ 효과 λ§Œλ“€μ–΄λ³΄κΈ°
      • ZEP Script 예제 μ½”λ“œ
        • ⏰타이머
        • β±οΈλ°©νƒˆμΆœ 타이머
        • πŸ€›μ‚¬μ΄λ“œλ°” μ•±
        • πŸ§Ÿβ€β™‚οΈμ’€λΉ„ κ²Œμž„
        • 🎨페인트맨 κ²Œμž„
        • πŸ™†β€β™€οΈμ΄ˆμ„± ν€΄μ¦ˆ
        • πŸ’©λ˜₯ν”Όν•˜κΈ° κ²Œμž„
        • πŸ₯Šκ²°νˆ¬ κ²Œμž„
        • πŸƒβ€β™‚οΈλ‹¬λ¦¬κΈ°
      • Custom Label 예제 μ½”λ“œ
        • Type-A
        • Type-B
        • Type-C
        • Type-D
        • Type-E
        • Type-F
        • Type-G
        • Type-H
        • Type-I
        • Type-J
      • μ‚¬μ΄λ“œ λ°” μ•± 예제 μ½”λ“œ
        • πŸ”ΉImage List
        • πŸ”ΉText List
        • πŸ”ΉText Button List
        • πŸ”ΉRanking List
        • πŸ”ΉSelect List
    • ZEP Script FAQ
    • 뢀둝
      • 🎑ZEP 슀크립트 ν™œμš© 사둀
      • πŸ—ΊοΈμŠ€νŽ˜μ΄μŠ€μ™€ λ§΅ μ΄ν•΄ν•˜κΈ°
      • βŒ¨οΈμžλ°”μŠ€ν¬λ¦½νŠΈ ν‚€μ½”λ“œ ν‘œ
      • πŸŽ¨μŠ€ν”„λΌμ΄νŠΈμ‹œνŠΈ μ΄ν•΄ν•˜κΈ°
      • πŸŒ€TileEffectType 상세 μ„€λͺ…
      • πŸ“ŒκΈ°μ€€ μ’Œν‘œ
      • πŸ›°οΈμ™ΈλΆ€ API ν†΅μ‹ ν•˜κΈ°
      • πŸ”°URL 쿼리슀트링 ν™œμš©ν•˜κΈ°
      • πŸͺ§μœ„μ ―μ—μ„œ μ‚¬μš©κ°€λŠ₯ν•œ 문법
      • πŸ”˜λͺ¨λ°”μΌλ²„νŠΌ 이미지 λ³€κ²½ν•˜κΈ°
      • ✳️ZEP 슀크립트 μƒν˜Έμž‘μš© 였브젝트 κ°€μ΄λ“œ
      • πŸ“‡μ˜€λΈŒμ νŠΈ npcProperty
  • ZEP SCRIPT API
    • πŸ“˜ZEP Script API
      • API Summary
      • ScriptApp
        • Lifecycle
        • Field
        • Storage
        • Event Listeners
        • Callbacks
        • Methods
      • ScriptMap
        • Field
        • Methods
      • ScriptPlayer
        • Field
        • Methods
      • ScriptWidget
        • Field
        • Event Listeners
        • Methods
      • UtilityClass
        • Time
Powered by GitBook
On this page
  • 이미지
  • 예제 μ½”λ“œ

Was this helpful?

  1. ZEP Script κ°€μ΄λ“œ
  2. ZEP Script λ”°λΌν•˜κΈ°
  3. Custom Label 예제 μ½”λ“œ

Type-J

PreviousType-INextμ‚¬μ΄λ“œ λ°” μ•± 예제 μ½”λ“œ

Last updated 1 year ago

Was this helpful?

Type-JλŠ” 레벨이 μžˆλŠ” λ―Έλ‹ˆ κ²Œμž„μ—μ„œ 자주 μ“°μ΄λŠ” Custom Label μž…λ‹ˆλ‹€.

λ˜₯ ν”Όν•˜κΈ° κ²Œμž„μ—μ„œ 쓰인 것을 λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.

이미지

예제 μ½”λ“œ

function showLabelTypeJ(player, key, text1, text2, text3) {
    const isMobile = player.isMobile;
    const topGap = isMobile ? 10 : -2; // 60px from the top on mobile and 48px on PC.
    /**
     * size based @labelPercentWidth
     * XL: isMobile ? 90 : 50;
     * L: isMobile ? 80 : 40;
     * M: isMobile ? 70 : 28;
     * S: isMobile ? 60 : 20
     */
    const labelPercentWidth = isMobile ? 60 : 20;
    const labelDisplayTime = 300000;

    const directionColumnStyle = `
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center;`.trim();

    const rowStyle = `
    display: flex; 
    align-items: center;
    justify-content: center;
    text-align: center;
    `.trim();

    const spanStyle = `
    font-size: ${isMobile ? "14px" : "18px"};
    font-weight: 700; 
    color: white;`.trim();

    const highlightSpanStyle = `
    font-size: ${isMobile ? "14px" : "18px"};
    font-weight: 700; 
    color: #FFEB3A;`.trim(); // Show red(#FF5353) when timeout is about to expire 

    const customLabelOption = {
        key: key,
        borderRadius: '12px',
        fontOpacity: false,
        padding: '8px',
    }

    let htmlStr = `
<span style="${directionColumnStyle}">
    <span style="${spanStyle}">${text1}</span>
    <span style="${rowStyle}">
        <span style="${spanStyle}">${text2}</span>
        <span style="${highlightSpanStyle}">${text3}</span>
    </span>
</span>`;

    player.showCustomLabel(htmlStr.trim(), 0xffffff, 0x27262e, topGap, labelPercentWidth, 0.64, labelDisplayTime, customLabelOption);
}