Added replaced sidebar label buttons with images, added 'radar' (currently static map image)

This commit is contained in:
2021-01-06 10:31:57 -06:00
parent 18641ece15
commit 0d449b9375
12 changed files with 85 additions and 50 deletions

View File

@@ -15,7 +15,10 @@ class IMICRTS
ent = IMICRTS::Entity.get(data[:entity])
raise "Failed to find entity: #{data[:entity].inspect}" unless ent
entity = Entity.new(name: ent.name, player: @parent, id: 0, position: CyberarmEngine::Vector.new, angle: 0, director: nil, proto_entity: true)
action.label = ent.name.to_s.split("_").map{ |s| s.capitalize }.join(" ")
action.image = entity.render
action.description = "#{action.label}\nCost: #{ent.cost}\n#{ent.description}"
action.block = proc do
@parent.director.schedule_order(IMICRTS::Order::BUILD_UNIT, @parent.player.id, @parent.id, data[:entity])
@@ -25,7 +28,10 @@ class IMICRTS
ent = IMICRTS::Entity.get(data[:entity])
raise "Failed to find entity: #{data[:entity].inspect}" unless ent
entity = Entity.new(name: ent.name, player: @parent, id: 0, position: CyberarmEngine::Vector.new, angle: 0, director: nil, proto_entity: true)
action.label = ent.name.to_s.split("_").map { |s| s.capitalize }.join(" ")
action.image = entity.render
action.description = "#{action.label}\nCost: #{ent.cost}\n#{ent.description}"
action.block = proc { @parent.director.game.set_tool(data[:tool], data) }