rename to kliffy
This commit is contained in:
parent
ee08d270a5
commit
178499f5a6
|
@ -1,6 +1,6 @@
|
||||||
###
|
###
|
||||||
Iffy - parserless interactive fiction for the web
|
Kliffy - Klikable Interactive Fiction For You!
|
||||||
(c)2010 Jeremy Penner
|
(c)2010-2011 Jeremy Penner
|
||||||
###
|
###
|
||||||
|
|
||||||
#lazy enumeration
|
#lazy enumeration
|
||||||
|
@ -176,13 +176,13 @@ class Gst
|
||||||
|
|
||||||
# show "previous section" link
|
# show "previous section" link
|
||||||
if @rgsection.length > 1
|
if @rgsection.length > 1
|
||||||
@jDiv.append("<div class='iffy-section-nav'>#{@Link("Previous section", () => @GoBackOneSection())}</div>")
|
@jDiv.append("<div class='kliffy-section-nav'>#{@Link("Previous section", () => @GoBackOneSection())}</div>")
|
||||||
|
|
||||||
# show all nevs in section
|
# show all nevs in section
|
||||||
@rgwst = null
|
@rgwst = null
|
||||||
@rgwst = @RgwstRun()
|
@rgwst = @RgwstRun()
|
||||||
for wst in @rgwst
|
for wst in @rgwst
|
||||||
jDivNev = $("<div class='iffy-nev'/>")
|
jDivNev = $("<div class='kliffy-nev'/>")
|
||||||
jDivNev.append(wst.nev.StHtmlDisplay(this, wst))
|
jDivNev.append(wst.nev.StHtmlDisplay(this, wst))
|
||||||
@jDiv.append(jDivNev)
|
@jDiv.append(jDivNev)
|
||||||
jDivNev.hover(dgEnter, dgLeave)
|
jDivNev.hover(dgEnter, dgLeave)
|
||||||
|
@ -191,7 +191,7 @@ class Gst
|
||||||
# show "next section" link
|
# show "next section" link
|
||||||
stHtmlNav = @wstLast.nev.StHtmlNextSection(this, @wstLast)
|
stHtmlNav = @wstLast.nev.StHtmlNextSection(this, @wstLast)
|
||||||
if stHtmlNav?
|
if stHtmlNav?
|
||||||
@jDiv.append("<div class='iffy-section-nav'>#{stHtmlNav}</div>")
|
@jDiv.append("<div class='kliffy-section-nav'>#{stHtmlNav}</div>")
|
||||||
|
|
||||||
for stId_dgOnClick in @mpstId_dgOnClick
|
for stId_dgOnClick in @mpstId_dgOnClick
|
||||||
@jDiv.find("##{stId_dgOnClick[0]}").click(stId_dgOnClick[1])
|
@jDiv.find("##{stId_dgOnClick[0]}").click(stId_dgOnClick[1])
|
||||||
|
@ -205,7 +205,7 @@ class Gst
|
||||||
|
|
||||||
ShowMenu: (ev, dLink, rgverb) ->
|
ShowMenu: (ev, dLink, rgverb) ->
|
||||||
@ClearMenu(true)
|
@ClearMenu(true)
|
||||||
jMenu = $("<div class='iffy-menu'/>").hide()
|
jMenu = $("<div class='kliffy-menu'/>").hide()
|
||||||
for verb in rgverb
|
for verb in rgverb
|
||||||
dgClick = ((verbT) => () => verbT.dgActivate(); @Display())(verb)
|
dgClick = ((verbT) => () => verbT.dgActivate(); @Display())(verb)
|
||||||
jMenuItem = $("<a href='javascript:void(0)'>#{verb.stDisplay}</a><br/>").click(dgClick)
|
jMenuItem = $("<a href='javascript:void(0)'>#{verb.stDisplay}</a><br/>").click(dgClick)
|
||||||
|
@ -340,7 +340,7 @@ class Nev
|
||||||
if not fReserved
|
if not fReserved
|
||||||
jdivTmp.append(document.importNode(dHTML, true))
|
jdivTmp.append(document.importNode(dHTML, true))
|
||||||
stHtml = jdivTmp[0].innerHTML
|
stHtml = jdivTmp[0].innerHTML
|
||||||
"<div class='iffy-nev-ui'>#{gst.StHtmlUi(wst)}</div><div class='iffy-nev-text'>#{gst.FilterStHtml(stHtml, wst)}</div>"
|
"<div class='kliffy-nev-ui'>#{gst.StHtmlUi(wst)}</div><div class='kliffy-nev-text'>#{gst.FilterStHtml(stHtml, wst)}</div>"
|
||||||
|
|
||||||
#[word text to display] -- links to a word, usually a noun, that the player can interact with in some way.
|
#[word text to display] -- links to a word, usually a noun, that the player can interact with in some way.
|
||||||
#[word] == [word word]
|
#[word] == [word word]
|
||||||
|
@ -432,7 +432,7 @@ TemplateFromStNev = (st, wst) ->
|
||||||
|
|
||||||
word = wst.gst.SectionCurrent().WordByName(wst.gst, stWord)
|
word = wst.gst.SectionCurrent().WordByName(wst.gst, stWord)
|
||||||
if word? and (rgverb = word.Rgverb(wst)).length > 0
|
if word? and (rgverb = word.Rgverb(wst)).length > 0
|
||||||
JsStringLit(wst.gst.Link(stDisplay, ((ev) -> wst.gst.ShowMenu(ev, this, rgverb)), "class='iffy-word'"))
|
JsStringLit(wst.gst.Link(stDisplay, ((ev) -> wst.gst.ShowMenu(ev, this, rgverb)), "class='kliffy-word'"))
|
||||||
else
|
else
|
||||||
JsStringLit(stDisplay)
|
JsStringLit(stDisplay)
|
||||||
MatchInWord = MatchBracket(1, 0, () -> PushText(true, StWord))
|
MatchInWord = MatchBracket(1, 0, () -> PushText(true, StWord))
|
||||||
|
@ -509,7 +509,7 @@ class ActorPlayer
|
||||||
|
|
||||||
StHtmlUi: (wst) ->
|
StHtmlUi: (wst) ->
|
||||||
if (wst.nev.player_nevIDRespondedTo?)
|
if (wst.nev.player_nevIDRespondedTo?)
|
||||||
wst.gst.Link("Undo", (() => @RemoveResponse(wst.nev); wst.gst.Display()), "class='iffy-undo'")
|
wst.gst.Link("Undo", (() => @RemoveResponse(wst.nev); wst.gst.Display()), "class='kliffy-undo'")
|
||||||
|
|
||||||
class ActorNext
|
class ActorNext
|
||||||
constructor: (@story) ->
|
constructor: (@story) ->
|
|
@ -1,5 +1,5 @@
|
||||||
###
|
###
|
||||||
RetroChronal -- an iffy module for violating causality
|
RetroChronal -- a kliffy module for violating causality
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
<pastresponse after="nev" future_cause="nev" [name="name"]>
|
<pastresponse after="nev" future_cause="nev" [name="name"]>
|
||||||
|
|
|
@ -3,32 +3,32 @@
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="jqueryui/css/ui-lightness/jquery-ui-1.8.5.custom.css">
|
<link rel="stylesheet" href="jqueryui/css/ui-lightness/jquery-ui-1.8.5.custom.css">
|
||||||
<style>
|
<style>
|
||||||
div.iffy-menu {
|
.kliffy-menu {
|
||||||
border: 1px solid #777;
|
border: 1px solid #777;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #eeeeee;
|
background-color: #eeeeee;
|
||||||
}
|
}
|
||||||
div.hover div {
|
.hover div {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
div.iffy-nev-ui {
|
.kliffy-nev-ui {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
div.hover div.iffy-nev-ui {
|
.hover .kliffy-nev-ui {
|
||||||
display: inline;
|
display: inline;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
// a.iffy-word:link {
|
// a.kliffy-word:link {
|
||||||
// text-decoration: none;
|
// text-decoration: none;
|
||||||
// color: #000000;
|
// color: #000000;
|
||||||
// }
|
// }
|
||||||
// a.iffy-word:hover {
|
// a.kliffy-word:hover {
|
||||||
// color: #0000dd;
|
// color: #0000dd;
|
||||||
// }
|
// }
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript" src="jquery.js"></script>
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
<script type="text/javascript" src="jqueryui/js/jquery-ui-1.8.5.custom.min.js"></script>
|
<script type="text/javascript" src="jqueryui/js/jquery-ui-1.8.5.custom.min.js"></script>
|
||||||
<script type="text/javascript" src="iffy.js"></script>
|
<script type="text/javascript" src="kliffy.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
PlayStory("timemachine.xml", $("#story"));
|
PlayStory("timemachine.xml", $("#story"));
|
||||||
|
|
Loading…
Reference in a new issue