Code: |
def refresh self.contents.clear for i in 0..134 x = 24 + i / 5 / 9 * 152 + i % 5 * 28 y = 9 + i / 5 % 9 * 29 self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1) end self.contents.draw_text(0, 9 + 8 * 29, 511, 32, "OK", 2) end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def update_cursor_rect # ??????? [??] ??? if @index >= 135 self.cursor_rect.set(483, 9 + 8 * 29, 32, 32) # ??????? [??] ????? else x = 24 + @index / 5 / 9 * 152 + @index % 5 * 28 y = 9 + @index / 5 % 9 * 29 self.cursor_rect.set(x, y, 32, 32) end end |
Code: |
def refresh self.contents.clear for i in 0..134 x = 52 + i / 5 / 9 * 140 + i % 5 * 28 y = 9 + i / 5 % 9 * 29 self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1) end self.contents.draw_text(14, 9 + 8 * 29, 511, 32, "OK", 2) end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def update_cursor_rect # ??????? [??] ??? if @index >= 135 self.cursor_rect.set(497, 9 + 8 * 29, 32, 32) # ??????? [??] ????? else x = 52 + @index / 5 / 9 * 140 + @index % 5 * 28 y = 9 + @index / 5 % 9 * 29 self.cursor_rect.set(x, y, 32, 32) end end |
Code: |
def refresh self.contents.clear for i in 0..134 x = 52 + i / 5 / 9 * 140 + i % 5 * 28 y = 9 + i / 5 % 9 * 29 self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE[i], 1) end self.contents.draw_text(14, 9 + 8 * 29, 511, 32, "OK", 2) end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def update_cursor_rect # ??????? [??] ??? if @index >= 135 self.cursor_rect.set(497, 9 + 8 * 29, 32, 32) # ??????? [??] ????? else x = 52 + @index / 5 / 9 * 140 + @index % 5 * 28 y = 9 + @index / 5 % 9 * 29 self.cursor_rect.set(x, y, 32, 32) end end |