Initial commit
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
Executable
+25
@@ -0,0 +1,25 @@
|
||||
settings:
|
||||
increment: 100 # how much each tier increases by
|
||||
start: 100 # starting amount see tier's comment
|
||||
tiers: 5 # 5 tiers 100, 200, 300, 400, 500 based on above settings
|
||||
dailyDouble:
|
||||
enabled: true # should daily double be enabled?
|
||||
minQuestions: 7 # how many questions need to be answered before a daily double can appear?
|
||||
count: 2 # how many daily doubles should there be?
|
||||
categories: # the name of each category should correspond to a yaml file with the same name
|
||||
- name: shounen # name must be alphanumeric, cannot start with a number or contain special characters "-" and "." are ok if they are not at the beginning
|
||||
displayName: "Shounen" # if blank will use name
|
||||
image: "assets/14018-3193093789.gif" # if set will display image instead of name, categories are referenced by name which is required
|
||||
- name: openings
|
||||
displayName: "Openings" # if blank will use name
|
||||
- name: sadness
|
||||
displayName: "Sadness" # if blank will use name
|
||||
- name: random
|
||||
displayName: Random # if blank will use name
|
||||
- name: you-would-have-though
|
||||
displayName: "You would have\nthought" # if blank will use name
|
||||
- name: wtf-is-that
|
||||
displayName: "Wtf is that!?" # if blank will use name
|
||||
- name: owo
|
||||
displayName: "owo" # if blank will use name
|
||||
# image: "assets/anime-gif-boobs-funny-2710211137.gif"
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
questions: # expects a list equal to the tier
|
||||
- title: "Name at least 10 of the characters here"
|
||||
time-limit: 60 # If omitted there is no time limit
|
||||
answer: 10
|
||||
image: "anime/assets/shounen_name_characters.png"
|
||||
# Types: builtin
|
||||
# - WhatIs (default),
|
||||
# - MultipleChoice,
|
||||
# - GuessSound (.wav, .mp3, .ogg, .oga, .ogv),
|
||||
# - GuessImage (.png, jpg),
|
||||
# - GuessVideo (.ogv)
|
||||
template: "one-image" # template to use
|
||||
- title: "2+2="
|
||||
time-limit: 10 # If omitted there is no time limit
|
||||
answer: 4
|
||||
imageA: ""
|
||||
imageB: ""
|
||||
template: "imageword" # template to use
|
||||
- title: "4+4="
|
||||
time-limit: 10 # If omitted there is no time limit
|
||||
answer: 8
|
||||
# Types: builtin
|
||||
# - WhatIs (default),
|
||||
# - MultipleChoice,
|
||||
# - GuessSound (.wav, .mp3, .ogg, .oga, .ogv),
|
||||
# - GuessImage (.png, jpg),
|
||||
# - GuessVideo (.ogv)
|
||||
template: "whatis" # template to use
|
||||
- title: "8+8="
|
||||
time-limit: 10 # If omitted there is no time limit
|
||||
answer: 16
|
||||
# Types: builtin
|
||||
# - WhatIs (default),
|
||||
# - MultipleChoice,
|
||||
# - GuessSound (.wav, .mp3, .ogg, .oga, .ogv),
|
||||
# - GuessImage (.png, jpg),
|
||||
# - GuessVideo (.ogv)
|
||||
template: "whatis" # template to use
|
||||
@@ -0,0 +1,70 @@
|
||||
--[[ Constants
|
||||
* (all lua builtins that don't allow io/executing code)
|
||||
color (interface)
|
||||
gui (interface)
|
||||
multi (interface bound to a processor) no thread module
|
||||
|
||||
callback true/false correct/wrong
|
||||
]]
|
||||
local label
|
||||
local imageHolder
|
||||
local imageHolder2
|
||||
|
||||
local function index(window, q, callback)
|
||||
frame = window:newFrame(0,0,0,-200,0,.2,1,.8)
|
||||
frame.visibility = 0
|
||||
label = window:newTextLabel(" " ..q.title.. " ",0,0,0,0,0,0,1,.2)
|
||||
label.align = ALIGN_CENTER
|
||||
label.textColor = color.white
|
||||
label.color = color.new("#060ce9")
|
||||
|
||||
if not q.imageA or q.imageA == "" then
|
||||
error("Missing 'imageA' field for question!")
|
||||
end
|
||||
|
||||
if not q.imageB or q.imageB == "" then
|
||||
error("Missing 'imageB' field for question!")
|
||||
end
|
||||
|
||||
imageHolder = frame:newImageLabel(q.imageA)
|
||||
imageHolder:setAspectSize(imageHolder.imageWidth,imageHolder.imageHeight)
|
||||
imageHolder:setDualDim(0,0,imageHolder.imageWidth,imageHolder.imageHeight)
|
||||
|
||||
imageHolder2 = frame:newImageLabel(q.imageB)
|
||||
imageHolder2:setAspectSize(imageHolder2.imageWidth,imageHolder2.imageHeight)
|
||||
imageHolder2:setDualDim(0,0,imageHolder2.imageWidth,imageHolder2.imageHeight)
|
||||
|
||||
local correct = window:newTextButton("Correct",0,-200,0,100,0,1,.5)
|
||||
correct.color = color.new("#52b11b")
|
||||
local wrong = window:newTextButton("Wrong",0,-200,0,100,.5,1,.5)
|
||||
wrong.color = color.new("#bd2626")
|
||||
local skip = window:newTextButton("Skip",0,-100,0,100,.25,1,.5)
|
||||
skip.color = color.new("#5d5d5d")
|
||||
window.apply({
|
||||
centerX = {true},
|
||||
centerY = {true},
|
||||
},imageHolder, imageHolder2)
|
||||
window.apply({
|
||||
fitFont={},
|
||||
align=window.ALIGN_CENTER,
|
||||
OnReleased=function(self)
|
||||
if self.text == "Skip" then
|
||||
callback()
|
||||
return
|
||||
end
|
||||
callback(self.text == "Correct")
|
||||
end,
|
||||
},correct,wrong,skip)
|
||||
end
|
||||
|
||||
local function update(dt) -- time in seconds that has passed since
|
||||
_,_,w,h = imageHolder.parent:getAbsolutes()
|
||||
local x,y,w,h = imageHolder:GetSizeAdjustedToAspectRatio(w,h)
|
||||
imageHolder:setDualDim(w,h,x,y)
|
||||
label:fitFont()
|
||||
end
|
||||
|
||||
return {
|
||||
index = index,
|
||||
update = update
|
||||
}
|
||||
Reference in New Issue
Block a user