From ae28b5f4ef18f574b3bc34f921dbfab7b337b234 Mon Sep 17 00:00:00 2001 From: oeloeloel <26174257+oeloeloel@users.noreply.github.com> Date: Thu, 6 Aug 2020 10:04:59 -0400 Subject: Update numeric.rb Added from_top method --- dragon/numeric.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dragon/numeric.rb b/dragon/numeric.rb index 6d8b84d..5485ff8 100644 --- a/dragon/numeric.rb +++ b/dragon/numeric.rb @@ -9,6 +9,11 @@ class Numeric alias_method :gte, :>= alias_method :lte, :<= + + # Converts numeric value to distance from top of stage + def from_top + $gtk.args.grid.h - self + end # Converts a numeric value representing seconds into frames. # -- cgit v1.2.3