diff --git a/intro.txt b/intro.txt index d05c9d1bdbfe0467f986acd55e6eb4be5df6fb18..6ce6b13ff7e9a025e866722300e0ca25ef6b934c 100644 --- a/intro.txt +++ b/intro.txt @@ -2,12 +2,12 @@ <earthhigh>||</earthhigh> <earthhigh>||</earthhigh> <earthhigh>||</earthhigh> - <earthhigh>||</earthhigh> <water>~-----~</water> - <earthhigh>||</earthhigh> <water>/===-- --</water> - <earthhigh>||</earthhigh> <identifier>;'</identifier> <water>/==~- -- -</water> - <earthhigh>||</earthhigh> <identifier>(/ ('</identifier> <water>/=---- ~~_</water> - <earthhigh>||</earthhigh> <identifier>' / ;'</identifier> <water>/=---- \</water> - <water>' <airlow>~==_=~</airlow> <identifier>'('</identifier> ~-~~ ~~~~ ~~~-</water> + <earthhigh>||</earthhigh> <water>~---~</water> + <earthhigh>||</earthhigh> <water>/===- -</water> + <earthhigh>||</earthhigh> <identifier>;'</identifier> <water>/==~- - -</water> + <earthhigh>||</earthhigh> <identifier>(/ ('</identifier> <water>/=---- ~_</water> + <earthhigh>||</earthhigh> <identifier>' / ;'</identifier> <water>/=---- \</water> + <water>' <airlow>~==_=~</airlow> <identifier>'('</identifier> ~-~~ ~~~~ ~~-</water> <water>\\ <regular>(c<airlow>_</airlow>\_ .i.</regular> /~-- ~~~-- -~ (</water> <water>`\ <regular>(}<airlow>|</airlow> / / : \</regular> / ~~------~ ~~\ (</water> <water>\ ' <regular><airlow>||</airlow>/ \ |<mob>===</mob>|</regular> /~/ ~~~ \ \(</water> @@ -46,7 +46,7 @@ <earth> :**888H: `: .xH"" :8 .uef^" ..</earth> <earth> X `8888k XX888 .88 :d88E @L .u .</earth> <earth>'8hx 48888 ?8888 .u :888ooo `888E 9888i .dL .d88B :@8c</earth> -<earth>'8888 '8888 `8888 ud8888. -*8888888 888E .z8k `Y888k:*888. ="8888f8888r</earth> +<earth>'8888 '8888 `8888 ud8888. -*8888888 888E .z8k `Y888k:*888. ="8888f888r</earth> <earth> %888>'8888 8888 :888'8888. 8888 888E~?888L 888E 888I 4888>'88"</earth> <earth> "8 '888" 8888 d888 '88%" 8888 888E 888E 888E 888I 4888> '</earth> <earth> .-` X*" 8888 8888.+" 8888 888E 888E 888E 888I 4888></earth> diff --git a/lib/aethyr/core/render/display.rb b/lib/aethyr/core/render/display.rb index 16941d575054d30c8c9889a0604feef120b68a8e..198f5ea547b081619beb8a2cda94d17c1c440b96 100644 --- a/lib/aethyr/core/render/display.rb +++ b/lib/aethyr/core/render/display.rb @@ -44,6 +44,8 @@ class Display :input => Window.new(@color_settings), :map => Window.new(@color_settings), :look => Window.new(@color_settings), + :quick_bar => Window.new(@color_settings), + :status => Window.new(@color_settings) } self.selected = :input layout @@ -81,13 +83,23 @@ class Display def layout(layout: @layout_type) puts "layout #{layout} set for resolution #{@width}x#{@height}" @layout_type = layout - if @layout_type == :full && @height > 60 && @width > 165 - @windows[:map].create(height: @height/2) + if @layout_type == :full && @height > 60 && @width > 249 + @windows[:quick_bar].create(height: 3, y: @height - 5) + @windows[:map].create(height: @height/2 + 1, width: 166) + @windows[:look].create(height: @height/2 - 3, width: 83, y: @height/2) + @windows[:main].create(height: @height/2 - 3, width: 83, x: 83, y: @height/2) + @windows[:status].create(height: @height - 4, x: 166) + elsif (@layout_type == :partial || @layout_type == :full) && @height > 60 && @width > 166 + @windows[:status].destroy + @windows[:quick_bar].create(height: 3, y: @height - 5) + @windows[:map].create(height: @height/2 + 1) @windows[:look].create(height: @height/2 - 3, width: 83, y: @height/2) @windows[:main].create(height: @height/2 - 3, x: 83, y: @height/2) else @windows[:map].destroy @windows[:look].destroy + @windows[:quick_bar].destroy + @windows[:status].destroy @windows[:main].create(height: @height - 2) end @windows[:input].create(height: 3, y: @height - 3) @@ -269,15 +281,23 @@ CONF send("No map of current area.", message_type: :map, internal_clear: true) end end + + if @windows[:quick_bar].exists? + send("this is the quick bar", message_type: :quick_bar, internal_clear: true, add_newline: false) + end + + if @windows[:status].exists? + send("This is the status window", message_type: :status, internal_clear: true, add_newline: false) + end end private def update @windows.each do |channel, window| - window.update unless channel == :input + window.update unless channel == self.selected end - @windows[:input].update #make sure input always takes the cursor + @windows[self.selected].update unless @windows[self.selected].nil? #make sure the selected window always takes the last update so border renders properly Ncurses.doupdate() end @@ -401,22 +421,26 @@ CONF when 9 # tab case self.selected when :input - self.selected = :main - when :main - if @windows[:map].exists? - self.selected = :map - elsif @windows[:look].exists? + if @windows[:look].exists? self.selected = :look + else + self.selected = :main + end + when :main + if @windows[:status].exists? + self.selected = :status else self.selected = :input end when :map - if @windows[:look].exists? - self.selected = :look + self.selected = :main + when :look + if @windows[:map].exists? + self.selected = :map else self.selected = :input end - when :look + when :status self.selected = :input else self.selected = :input