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",
|
||||
"Type": 0,
|
||||
"URL": "https://i.imgur.com/AFuB9II.png"
|
||||
},
|
||||
{
|
||||
"Name": "TitleGradient",
|
||||
"Type": 0,
|
||||
"URL": "https://i.imgur.com/Mdjm349.png"
|
||||
}
|
||||
]
|
||||
|
@ -1018,7 +1018,7 @@ function titleSplash(scenarioName)
|
||||
|
||||
-- display scenario name and set a 4 seconds (2 seconds animation and 2 seconds on screen)
|
||||
-- wait timer to hide the scenario name
|
||||
UI.setValue('title_splash', scenarioName)
|
||||
UI.setValue('title_splash_text', scenarioName)
|
||||
UI.show('title_splash')
|
||||
hideTitleSplashWaitFunctionId = Wait.time(function()
|
||||
UI.hide('title_splash')
|
||||
|
@ -11,12 +11,15 @@ local ENCOUNTER_DISCARD_AREA = {
|
||||
}
|
||||
|
||||
local currentScenario
|
||||
-- we use this to turn off collision handling until onLoad() is complete
|
||||
local COLLISION_ENABLED = false
|
||||
|
||||
function onLoad(saveState)
|
||||
if saveState ~= nil then
|
||||
local loadedState = JSON.decode(saveState) or { }
|
||||
currentScenario = loadedState.currentScenario
|
||||
end
|
||||
COLLISION_ENABLED = true
|
||||
end
|
||||
|
||||
function onSave()
|
||||
@ -27,6 +30,9 @@ end
|
||||
|
||||
-- TTS event handler. Handles scenario name event triggering and encounter card token resets.
|
||||
function onCollisionEnter(collisionInfo)
|
||||
if not COLLISION_ENABLED then
|
||||
return
|
||||
end
|
||||
local object = collisionInfo.collision_object
|
||||
if object.getName() == "Scenario" then
|
||||
if currentScenario ~= object.getDescription() then
|
||||
|
@ -98,16 +98,28 @@
|
||||
</VerticalLayout>
|
||||
|
||||
<!-- Title Splash when starting a scenario -->
|
||||
<Text id="title_splash"
|
||||
fontSize="150"
|
||||
font="font_teutonic-arkham"
|
||||
outline="black"
|
||||
outlineSize="3 -3"
|
||||
<Panel
|
||||
id="title_splash"
|
||||
height="220"
|
||||
position="0 250 0"
|
||||
showAnimation="FadeIn"
|
||||
hideAnimation="FadeOut"
|
||||
active="false"
|
||||
animationDuration="2"
|
||||
horizontalOverflow="Wrap">
|
||||
animationDuration="2">
|
||||
<Image
|
||||
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"/>
|
||||
|
Loading…
Reference in New Issue
Block a user