ruby: add popup_announcement method

develop
jj 2012-08-11 22:25:08 +02:00
parent cb04a082fd
commit 2362bb8eea
1 changed files with 9 additions and 0 deletions

@ -68,5 +68,14 @@ module DFHack
world.status.display_timer = 2000 world.status.display_timer = 2000
end end
end end
# add an announcement to display in a game popup message
# (eg "the megabeast foobar arrived")
def popup_announcement(str, color=nil, bright=nil)
pop = PopupMessage.cpp_new(:text => str)
pop.color = color if color
pop.bright = bright if bright
world.status.popups << pop
end
end end
end end