Scriptname aaaKimachuuAGFNSMCM extends SKI_ConfigBase  

GlobalVariable Property aaaKimachuuAGFNSchanceG Auto

;変数の定義
Int chanceID

Float _chance

;初期化
Event OnConfigInit()
    _chance = aaaKimachuuAGFNSchanceG.GetValue()
EndEvent

;MCMのバージョン
int function GetVersion()
	   return 1
endFunction 

;ページの設定
Event OnPageReset(string page)
   SetCursorFillMode(TOP_TO_BOTTOM)
   chanceID = AddSliderOption("Chance", _chance, "Chance:{0}")
endEvent

;スライダーを開いた時
Event OnOptionSliderOpen(int option)
   if (option == chanceID)
       SetSliderDialogStartValue(_chance)
       SetSliderDialogDefaultValue(5)
       SetSliderDialogRange(0, 100)
       SetSliderDialogInterval(1)
   endIf
EndEvent

Event OnOptionSliderAccept(int option, float value)
   if (option == chanceID)
       _chance = Value
       SetSliderOptionValue(chanceID, _chance, "Chance: {0}")
       aaaKimachuuAGFNSchanceG.SetValue(_chance)
   endIf
EndEvent

;デフォルトの設定
Event OnOptionDefault(int option)
 If(option == chanceID)
       _chance = 40
       SetSliderOptionValue(chanceID, _chance, "Chance: {0}")
       aaaKimachuuAGFNSchanceG.SetValue(_chance)
 EndIf
EndEvent

;カーソルが乗った時に下に出るテキストの設定
Event OnOptionHighlight(int option)
  If(option == chanceID)
           SetInfoText("Sex Chance Slider")
  EndIf
EndEvent