XP 스크립트

class Bitmap
  # draw_linex(x1, x2, y, color)
  def draw_linex(x1, x2, y, color)
    x = [x1, x2]
    max = x.max
    min = x.min
    fill_rect(min, y, max-min, 1, color)
  end
  # draw_liney(y1, y2, x, color)
  def draw_liney(y1, y2, x, color)
    y = [y1, y2]
    max = y.max
    min = y.min
    fill_rect(x, min, 1, max-min, color)
  end
  # square_outline(x, y, width, height, color)
  def draw_square(x, y, width, height, color)
    xa = [x, width]
    ya = [y, height]
    draw_linex(x, width, ya.min, color)
    draw_linex(x, width, ya.max, color)
    draw_liney(y, height, xa.max, color)
    draw_liney(y, height, xa.min, color)
  end
end

스크립트 다룰줄 아시는 분들에게 유용한 스크립트입니다.

줄 한개를 긋거나, 네모를 만들때 유용합니다.

x축으로 줄을 긋는 함수는 draw_linex(x1, x2, y, color)입니다.
x1, x2는 시작점부터 끝점까지.
y는 y좌표.
color은 칼라입니다.

y축으로 줄을 긋는 함수는 draw_liney(y1, y2, x, color)입니다.
y1, y2는 시작점부터 끝점까지.
x는 x좌표.
color은 칼라입니다.

네모는 square_outline(x, y, width, height, color)입니다.
x는 x좌표
y는 y좌표
width는 폭(x로부터)
height는 높이(y로부터)
color은 칼라입니다.
Comment '6'
  • ?
    TANESIA 2009.01.24 02:36
    줄긋기??
    동영상을좀 올려주세요!! 저갓은 바보는 어케함?
  • ?
    나뚜루 2009.01.24 11:30
    비트맵 클래스에서 사용하는 스크립트입니다.
    즉, 스크립트를 못다루시면.. 뭐;;;
  • ?
    후르츠파르페 2009.01.24 13:55
    ㅡ.ㅡ 이건 뭔가요????
  • ?
    나뚜루 2009.01.24 17:31
    Bitmap 클래스에서 줄 긋는걸 도와주는 스크립트.
  • ?
    RPG좋아 2009.02.02 18:29
    으으,스크립트가 어려워
  • ?
    만능태도 2011.04.26 15:29

    쉽게 설명하자면 스크립트로 GUI 제작할꺼 아닌이상 몰라도 되는 스크립트 입니다.

    애초에 스크립트라고 부르기보단 하나의 메서드 개념이죠 ㅋㅋ


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6193
561 기타 [신기술 체험] 오투잼 스크립트 7 file 백호 2009.02.22 1959
560 파티 [신기술 체험] 2p파티시스템(액알) 8 file 백호 2009.02.22 3196
559 기타 [신기술 체험] 솔로채팅창 17 file 백호 2009.02.22 2188
558 기타 [신기술 체험] RPGXP 3D 9 file 백호 2009.02.22 3637
557 전투 [신기술 체험]액션배틀1탄 6 file 백호 2009.02.22 2767
556 메뉴 Advanced Command Windows by Tsunokiette file 백호 2009.02.22 1307
555 기타 RM2K Facesets, Inn & Windowskin Colors by DerVVulfman@rmxp.org 1 file 백호 2009.02.22 866
554 스킬 SG_Skill Break by sandgolem (SDK호환) 백호 2009.02.22 772
553 아이템 SG_Item Break by sandgolem (SDK호환) 백호 2009.02.22 898
552 전투 SG_Attack Break by sandgolem (SDK호환) 백호 2009.02.22 814
551 메뉴 혹시있나해서-_-.. 대화창에 테두리치기 스크립트 7 백호 2009.02.22 2595
550 스킬 Skill Requirements by SephirothSpawn (SDK호환) file 백호 2009.02.22 763
549 저장 Inn & Save Point System by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 811
548 전투 Stealing/Mugging/Scanning 6.0 Final by Trickster (SDK호환) file 백호 2009.02.22 885
547 키입력 Mouse Input Module v5 by Near Fantastica (SDK호환) 2 백호 2009.02.22 962
546 키입력 Keyboard Input Module v5 by Near Fantastica (SDK호환) 백호 2009.02.22 1075
545 키입력 전체키 입력 스크립트 v4 by Cybersam 5 file 백호 2009.02.22 1948
544 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
543 기타 Monster Arena by trickster file 백호 2009.02.22 812
542 기타 Minesweeper(지뢰찾기) by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1363
Board Pagination Prev 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ... 52 Next
/ 52