mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 00:02:33 +00:00
Added replaced sidebar label buttons with images, added 'radar' (currently static map image)
This commit is contained in:
@@ -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) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user