Merge pull request #183 from argonui/title-gradient
Enhancements and tweaks for the scenario title splash
This commit is contained in:
commit
560ddf7b56
@ -198,5 +198,10 @@
|
|||||||
"Name": "Inv-Jacqueline",
|
"Name": "Inv-Jacqueline",
|
||||||
"Type": 0,
|
"Type": 0,
|
||||||
"URL": "https://i.imgur.com/AFuB9II.png"
|
"URL": "https://i.imgur.com/AFuB9II.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "TitleGradient",
|
||||||
|
"Type": 0,
|
||||||
|
"URL": "https://i.imgur.com/Mdjm349.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -875,7 +875,7 @@ function applyOptionPanelChange(id, state)
|
|||||||
-- option: Show CYOA campaign guides
|
-- option: Show CYOA campaign guides
|
||||||
elseif id == "showCYOA" then
|
elseif id == "showCYOA" then
|
||||||
optionPanel[id] = spawnOrRemoveHelper(state, "CYOA Campaign Guides", {65, 1.6, -11})
|
optionPanel[id] = spawnOrRemoveHelper(state, "CYOA Campaign Guides", {65, 1.6, -11})
|
||||||
|
|
||||||
-- option: Show custom playmat images
|
-- option: Show custom playmat images
|
||||||
elseif id == "showCustomPlaymatImages" then
|
elseif id == "showCustomPlaymatImages" then
|
||||||
optionPanel[id] = spawnOrRemoveHelper(state, "Custom Playmat Images", {67.5, 1.6, 37})
|
optionPanel[id] = spawnOrRemoveHelper(state, "Custom Playmat Images", {67.5, 1.6, 37})
|
||||||
@ -1018,7 +1018,7 @@ function titleSplash(scenarioName)
|
|||||||
|
|
||||||
-- display scenario name and set a 4 seconds (2 seconds animation and 2 seconds on screen)
|
-- display scenario name and set a 4 seconds (2 seconds animation and 2 seconds on screen)
|
||||||
-- wait timer to hide the scenario name
|
-- wait timer to hide the scenario name
|
||||||
UI.setValue('title_splash', scenarioName)
|
UI.setValue('title_splash_text', scenarioName)
|
||||||
UI.show('title_splash')
|
UI.show('title_splash')
|
||||||
hideTitleSplashWaitFunctionId = Wait.time(function()
|
hideTitleSplashWaitFunctionId = Wait.time(function()
|
||||||
UI.hide('title_splash')
|
UI.hide('title_splash')
|
||||||
|
@ -11,12 +11,15 @@ local ENCOUNTER_DISCARD_AREA = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local currentScenario
|
local currentScenario
|
||||||
|
-- we use this to turn off collision handling until onLoad() is complete
|
||||||
|
local COLLISION_ENABLED = false
|
||||||
|
|
||||||
function onLoad(saveState)
|
function onLoad(saveState)
|
||||||
if saveState ~= nil then
|
if saveState ~= nil then
|
||||||
local loadedState = JSON.decode(saveState) or { }
|
local loadedState = JSON.decode(saveState) or { }
|
||||||
currentScenario = loadedState.currentScenario
|
currentScenario = loadedState.currentScenario
|
||||||
end
|
end
|
||||||
|
COLLISION_ENABLED = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function onSave()
|
function onSave()
|
||||||
@ -27,6 +30,9 @@ end
|
|||||||
|
|
||||||
-- TTS event handler. Handles scenario name event triggering and encounter card token resets.
|
-- TTS event handler. Handles scenario name event triggering and encounter card token resets.
|
||||||
function onCollisionEnter(collisionInfo)
|
function onCollisionEnter(collisionInfo)
|
||||||
|
if not COLLISION_ENABLED then
|
||||||
|
return
|
||||||
|
end
|
||||||
local object = collisionInfo.collision_object
|
local object = collisionInfo.collision_object
|
||||||
if object.getName() == "Scenario" then
|
if object.getName() == "Scenario" then
|
||||||
if currentScenario ~= object.getDescription() then
|
if currentScenario ~= object.getDescription() then
|
||||||
|
@ -98,16 +98,28 @@
|
|||||||
</VerticalLayout>
|
</VerticalLayout>
|
||||||
|
|
||||||
<!-- Title Splash when starting a scenario -->
|
<!-- Title Splash when starting a scenario -->
|
||||||
<Text id="title_splash"
|
<Panel
|
||||||
fontSize="150"
|
id="title_splash"
|
||||||
font="font_teutonic-arkham"
|
height="220"
|
||||||
outline="black"
|
position="0 250 0"
|
||||||
outlineSize="3 -3"
|
|
||||||
showAnimation="FadeIn"
|
showAnimation="FadeIn"
|
||||||
hideAnimation="FadeOut"
|
hideAnimation="FadeOut"
|
||||||
active="false"
|
active="false"
|
||||||
animationDuration="2"
|
animationDuration="2">
|
||||||
horizontalOverflow="Wrap">
|
<Image
|
||||||
</Text>
|
id="title_gradient"
|
||||||
|
height="220"
|
||||||
|
image="TitleGradient" />
|
||||||
|
<Text id="title_splash_text"
|
||||||
|
width="95%"
|
||||||
|
height="180"
|
||||||
|
resizeTextForBestFit="true"
|
||||||
|
resizeTextMinSize="100"
|
||||||
|
resizeTextMaxSize="150"
|
||||||
|
font="font_teutonic-arkham"
|
||||||
|
outline="black"
|
||||||
|
outlineSize="3 -3"
|
||||||
|
horizontalOverflow="Overflow">
|
||||||
|
</Text>
|
||||||
|
</Panel>
|
||||||
<Include src="OptionPanel.xml"/>
|
<Include src="OptionPanel.xml"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user