chart - escaco95/Warcraft-III-Libraries GitHub Wiki
μ ν©ν μν¬λννΈ λ²μ
1.28.5
λ§ν¬
κ°μ
κΈ°μ‘΄ jassμμ multiboard, multiboarditemμ ννλ‘ μ§μλμλ λ©ν°λ³΄λ κΈ°λ₯μ λμ μμ΄ μ§κ΄μ μΌλ‘ κ΄λ¦¬ν μ μλ κ°μ²΄μ λλ€.
local multiboard b = CreateMultiboard()
local multiboarditem t = MultiboardGetItem( b, 4, 0 ) // Y,X μμ
μ jass μ½λλ chart μΈμ€ν΄μ€λ₯Ό μ¬μ©νμ¬ λ€μκ³Ό κ°μ΄ ꡬννλ κ²μΌλ‘, λμΌν κ²°κ³Όλ¬Όμ μ»μ μ μμ΅λλ€.
local chart c = CreateChart()
loacl chartitem t = ChartGetItem( c, 0, 4 ) // X,Y μμ
λν, μ¬μ©μμ κ°λ° μ·¨ν₯μ λ§κ² struct method
λλ function
μ μ¬μ©νμ¬ μΈμ€ν΄μ€λ₯Ό μ μ΄ν μ μμ΅λλ€.
//
// ν¨μ νΈμΆμ κΈ°λ°μΌλ‘ ν chart κ°μ²΄ μμ
//
scope UsingChartWithFunction initializer main
private function AtLeast0sPassed takes nothing returns nothing
local chart c = CreateChart()
call ChartSetSize( c, 4, 4 )
call ChartSetTitle( c, "μ λͺ©" )
call ChartSetItemsStyle( c, false, true )
call ChartSetColumnStyle( c, 0, true, true )
call ChartSetColumnValue( c, 0, "κ°" )
call ChartSetItemValue( c, 0, 0, "λ΄μ©" )
call ShowChart(c)
endfunction
private function main takes nothing returns nothing
// λ©ν°λ³΄λ κ°μ²΄λ λ‘λ© μ§νμ μμ±λκ±°λ μ΄κΈ°νλ μ μμ΅λλ€.
// (μν¬λννΈ κ²°ν¨)
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,0.0,false)
call TriggerAddAction(t,function AtLeast0sPassed)
set t = null
endfunction
endscope
//
// λ©μλ νΈμΆμ κΈ°λ°μΌλ‘ ν chart κ°μ²΄ μμ
//
scope UsingChartWithMethod initializer main
private function AtLeast0sPassed takes nothing returns nothing
local chart c = chart.create()
call c.setSize( 4, 4 )
set c.title = "μ λͺ©"
call c.setStyles( false, true )
call c.column(0).setStyles( true, true )
set c.column(0).values = "κ°"
set c[0][0].value = "λ΄μ©"
set c.visible = true
endfunction
private function main takes nothing returns nothing
// λ©ν°λ³΄λ κ°μ²΄λ λ‘λ© μ§νμ μμ±λκ±°λ μ΄κΈ°νλ μ μμ΅λλ€.
// (μν¬λννΈ κ²°ν¨)
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,0.0,false)
call TriggerAddAction(t,function AtLeast0sPassed)
set t = null
endfunction
endscope