この前作ったXorShiftモジュールを使ってざっくりと適当に作った。
この前作ったXorShiftモジュールを使ってざっくりと適当に作った。
#cmpopt varinit 1#packopt name "txtLret"#packopt xsize 600,ysize 400#include "XorShift.as"new@XorShift rand#module GUI#deffunc GUIMainscreen 0,600,400title "テキストルーレット!"color 51,153,255boxf 0color 0,0,153font "Meiryo UI",16objmode 2pos 210,15mes "ルーレットしたい値を入れてね。"pos 10,40sdim txtList,0x7FFF#enum txtListID=0mesbox txtList,580,260pos 140,310objsize 200,24#enum onclickLretIDbutton gosub "Let's ルーレット!",*onclickLretpos 350,310objsize 100,24#enum onclickDefaultIDbutton gosub "デフォルト",*onclickDefaultpos 10,345sdim resultList,0xFF#enum resultListIDinput resultList,580,25return*onclickLretlretMainreturn*onclickDefaultlretDefaultreturn#global#module Lret#deffunc lretMainsdim txtListValuesplit txtList@GUI,"\n",txtListValueobjprm resultListID@GUI,txtListValue(xsRandInt(rand@,0,length(txtListValue)-1))return#deffunc lretDefaultmhList={"大剣太刀片手剣双剣ランスガンランスハンマー狩猟笛操虫棍穿龍棍ライトボウガンヘビィボウガン弓"}objprm txtListID@GUI,mhListreturn#globalGUIMain