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-H

PreviousType-GNextType-I

Last updated 1 year ago

Was this helpful?

Type-HλŠ” μ œν•œ μ‹œκ°„μ΄ μžˆλŠ” κ²Œμž„μ—μ„œ 남은 μ‹œκ°„μ„ ν‘œμ‹œν•  λ•Œ μ“°λŠ” Custom Labelμž…λ‹ˆλ‹€.

이미지

예제 μ½”λ“œ

function showLabelTypeH(player, key, text1, text2) {
    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 parentStyle = `
    display: flex; 
    align-items: center;
    justify-content: center;
    text-align: center;
    `;

    const firstRowStyle = `
    font-size: ${isMobile ? "14px" : "18px"};
    font-weight: 700; 
    color: white;`;

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


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

    let htmlStr = `<span style="${parentStyle}">
        <span style="${firstRowStyle}">${text1}</span>
        <span style="${highlightSpanStyle}">${text2}</span>
    </span>`;

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