#============================================================================== #roulette by sayonara-p #==============================================================================
class Window_Tablero < Window_Selectable #============================================================================== def initialize super(256, 64, 144, 416) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @item_max = 36 @column_max = 3 @filas_max = @item_max/@column_max @commandos = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36"] refresh self.index = 0 end #============================================================================== def refresh contador = 0 self.contents.clear for j in 0..@filas_max contador -=1 for i in 0..@column_max contador +=1 draw_item(contador, i, j) end end end #============================================================================== def draw_item(index, x, y) if index==0 or index==2 or index==4 or index==6 or index==8 or index==11 or index==13 or index==15 or index==17 or index==18 or index==20 or index==22 or index==24 or index==26 or index==29 or index==31 or index==33 or index==35 self.contents.font.color = knockout_color else self.contents.font.color = normal_color end self.contents.draw_text(x*41+9*x, y*33, 12, 32, @commandos[index].to_s,1) end #============================================================================== end #============================================================================== #============================================================================== #============================================================================== #============================================================================== #============================================================================== #============================================================================== class Scene_Tablero
def main @currentbet = 0 @indice_apuesta = 0 @numero_escogido = 0 @rojo = false @negro = false @par = false @impar = false @falta = false @pasa = false # ------------------------------------------------------------------ s1 = "Jouer" s2 = "Quitter" # ------------------------------------------------------------------ t1 = "Pari" t2 = " 5000" t3 = " 2000" t4 = " 1000" t5 = " 500" t6 = " 200" t7 = " 100" t8 = " 50" t9 = " 20" # ------------------------------------------------------------------ u1 = "Simple nombre" u2 = "Rouge ou Noir" u3 = "Pair ou impair" u4 = "Petit ou Grand" # ------------------------------------------------------------------ v1 = "Rouge" v2 = "Noir" # ------------------------------------------------------------------ w1 = "Pair" w2 = "Impair" # ------------------------------------------------------------------ x1 = "Petit" x2 = "Grand" # ------------------------------------------------------------------ @help_window = Window_Help.new @help_window.opacity = 100 # ------------------------------------------------------------------ @opcion_window = Window_Command.new(256, [s1, s2]) @opcion_window.active = true @opcion_window.width = 256 @opcion_window.height = 96 @opcion_window.y = 64 @opcion_window.opacity = 200 # ------------------------------------------------------------------ @tablero_window = Window_Tablero.new @tablero_window.active = false @tablero_window.index = -1 @tablero_window.opacity = 200 # ------------------------------------------------------------------ @apuesta_window = Window_Command.new(256, [t1, t2, t3, t4, t5, t6, t7, t8, t9]) @apuesta_window.width = 256 @apuesta_window.height = 480-64-96 @apuesta_window.y = 96 + 64 @apuesta_window.active = false @apuesta_window.index = -1 @apuesta_window.opacity = 200 # ------------------------------------------------------------------ @dinero_window = Window_Gold.new @dinero_window.width = 640-256-144 @dinero_window.x = 256 + 144 + 112 @dinero_window.y = 64 @dinero_window.opacity = 100 # ------------------------------------------------------------------ @tipo_window = Window_Command.new(640-256-144,[u1, u2, u3, u4]) @tipo_window.active = false @tipo_window.index = -1 @tipo_window.width = 640-256-144 @tipo_window.x = 256 + 144 @tipo_window.y = 64 + 96 @tipo_window.opacity = 100 # ------------------------------------------------------------------ @color_window = Window_Command.new(640-256-144,[v1, v2]) @color_window.active = false @color_window.index = -1 @color_window.width = 640-256-144 @color_window.x = 256 + 144 @color_window.y = 64 + 96 + 128 + 32 @color_window.opacity = 100 @color_window.visible = false # ------------------------------------------------------------------ @par_window = Window_Command.new(640-256-144,[w1, w2]) @par_window.active = false @par_window.index = -1 @par_window.width = 640-256-144 @par_window.x = 256 + 144 @par_window.y = 64 + 96 + 128 + 32 @par_window.opacity = 100 @par_window.visible = false # ------------------------------------------------------------------ @falta_window = Window_Command.new(640-256-144,[x1, x2]) @falta_window.active = false @falta_window.index = -1 @falta_window.width = 640-256-144 @falta_window.x = 256 + 144 @falta_window.y = 64 + 96 + 128 + 32 @falta_window.opacity = 100 @falta_window.visible = false # ------------------------------------------------------------------ @back_window = Window_Base.new(0,0,640,480) @back_window.opacity = 100 @back_window.z = 50 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose @opcion_window.dispose @tablero_window.dispose @apuesta_window.dispose @dinero_window.dispose @tipo_window.dispose @color_window.dispose @par_window.dispose @falta_window.dispose @back_window.dispose if $scene.is_a?(Scene_Title) Graphics.transition Graphics.freeze end end # ------------------------------------ def update @opcion_window.update @apuesta_window.update @tablero_window.update @tipo_window.update @color_window.update |