テキストルーレット

この前作ったXorShiftモジュールを使ってざっくりと適当に作った。

この前作ったXorShiftモジュールを使ってざっくりと適当に作った。

  • タグ:
  • タグはありません
#cmpopt varinit 1
#packopt name "txtLret"
#packopt xsize 600,ysize 400
#include "XorShift.as"
new@XorShift rand
#module GUI
#deffunc GUIMain
screen 0,600,400
title "!"
color 51,153,255
boxf 0
color 0,0,153
font "Meiryo UI",16
objmode 2
pos 210,15
mes ""
pos 10,40
sdim txtList,0x7FFF
#enum txtListID=0
mesbox txtList,580,260
pos 140,310
objsize 200,24
#enum onclickLretID
button gosub "Let's !",*onclickLret
pos 350,310
objsize 100,24
#enum onclickDefaultID
button gosub "",*onclickDefault
pos 10,345
sdim resultList,0xFF
#enum resultListID
input resultList,580,25
return
*onclickLret
lretMain
return
*onclickDefault
lretDefault
return
#global
#module Lret
#deffunc lretMain
sdim txtListValue
split txtList@GUI,"\n",txtListValue
objprm resultListID@GUI,txtListValue(xsRandInt(rand@,0,length(txtListValue)-1))
return
#deffunc lretDefault
mhList={"
穿
"}
objprm txtListID@GUI,mhList
return
#global
GUIMain
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX