Class: BattleUI::PlayerChoice::Button

Inherits:
SpriteSheet show all
Defined in:
scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb

Overview

Button of the player choice

Instance Attribute Summary

Attributes inherited from SpriteSheet

#nb_x, #nb_y, #sx, #sy

Attributes inherited from LiteRGSS::ShaderedSprite

#blendmode, #shader

Attributes inherited from LiteRGSS::Sprite

#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y

Instance Method Summary collapse

Methods inherited from SpriteSheet

#bitmap=, #select

Methods inherited from Sprite

#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update

Methods inherited from LiteRGSS::Sprite

new, #set_origin, #set_position

Methods inherited from LiteRGSS::Disposable

#dispose, #disposed?

Constructor Details

#initialize(viewport, index) ⇒ Button

Create a new Player Choice button

Parameters:



89
90
91
92
93
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 89

def initialize(viewport, index)
  super(viewport, 4, 1)
  self.index = index
  set_bitmap(image_filename, :interface)
end

Instance Method Details

#image_filenameString

Get the filename of the sprite

Returns:



100
101
102
# File 'scripts/01600 Alpha 25 Battle Engine/00001 Battle_Scene/00001 BattleUI/00200 PlayerChoice.rb', line 100

def image_filename
  return 'battle/actions_'
end