Okay, still doesn't work.
How do I display the GUI during speech?
How do I display the GUI during speech?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
function dialog_options_mouse_click(DialogOptionsRenderingInfo *info, MouseButton button)
{
if (info.ActiveOptionID > 0) {
DynamicSprite *MyDynamicSpriteForTheFakeGUI = DynamicSprite.CreateFromBackground(); //???????
DrawingSurface *ds = MyDynamicSpriteForTheFakeGUI.GetDrawingSurface();
DrawDialogOptions(ds, info);
ds.Release();
info.RunActiveOption();
}
}
DynamicSprite *sprite = DynamicSprite.CreateFromExistingSprite(SLOT, true); //safe closed
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
sprite.Crop(mouse.x-65, mouse.y-65, 240, 240);
sprite.CopyTransparencyMask(SLOT);
surface.DrawImage(mouse.x-65, mouse.y-65, sprite.Graphic, 20);
surface.DrawImage(0, 0, SLOT, 90); //safe closed
surface.Release();
sprite.Delete();
function dialog_options_get_dimensions(DialogOptionsRenderingInfo *info)
{
// Create a 1024x64 dialog options area at (0,704)
info.X = 0;
info.Y = 704;
info.Width = 1024;
info.Height = 64;
}
function dialog_options_render(DialogOptionsRenderingInfo *info)
{
int i = 1, ypos=0, xpos=0;
info.Surface.Clear(15);
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
String str = info.DialogToRender.GetOptionText(i);
int cur_img = str.AsInt;
info.Surface.DrawImage(xpos, ypos, cur_img);
xpos+=64;
}
i++;
}
}
function dialog_options_repexec(DialogOptionsRenderingInfo *info)
{
int i = 1, xpos = 0;
while (i <= info.DialogToRender.OptionCount)
{
if (info.DialogToRender.GetOptionState(i) == eOptionOn)
{
if (mouse.y >= info.Y && mouse.x >= xpos && mouse.x <= xpos+64)
{
info.ActiveOptionID = i;
return;
}
xpos+=64;
}
i++;
}
}
function dialog_options_mouse_click(DialogOptionsRenderingInfo *info, MouseButton button)
{
if (info.ActiveOptionID > 0) {
//PUT SPRITE COPY CODE HERE
info.RunActiveOption();
}
}
...
} else {
loop=1; //left
}
Display("view %d, loop %d", _height, loop);
this.LockView(_height);
this.Animate(loop, 0, eOnce, eBlock);
this.AddInventory(i, 0);
o.Visible = visibility;
...
function room_Load()
{
...
if (JuliusDied) {
cJulius.LockView(81);
}
}
function room_AfterFadeIn()
{
...
if (JuliusDied) {
cJulius.Animate(0, 0, eOnce, eBlock); //lying down/getting up animation
cJulius.SayBubble("&1353 Hmm, what a strange dream...");
JuliusDied=false;
cJulius.UnlockView();
cJulius.ChangeView(1); //julius
cJulius.SpeechView=2; //julius speech
cJulius.AnimationSpeed=-7; //normal animation speed
cJulius.SetWalkSpeed(4, 4); //normal walk speed
}
}
function hStick_Interact()
{
cJulius.FaceObject(oStick);
cJulius.SayBubble("&244 It's my friend - mr sticky-stick.");
cJulius.PickUp(eLow, iStick, oStick);
hStick.Enabled=false;
}
function PickUp (this Character*, PickUpHeight height, InventoryItem *i, Object *o, bool visibility)
{
int loop=0;
int _height=0;
if (height == eLow) {
_height=50; //low animation
}
if (height == eHigh) {
_height=49; //high animation
}
if (this.x <= o.X) {
loop=2; //right
} else {
loop=1; //left
}
this.LockView(_height);
this.Animate(loop, 0, eOnce, eBlock);
this.AddInventory(i, 0);
o.Visible = visibility;
this.UnlockView();
}
function room_Load()
{
gIconbar.Clickable=false;
gIconbar.Visible=false;
RunCreditsNow=true;
SetGameOption(OPT_CROSSFADEMUSIC, 0); //set crossfade to 'no crossfade' for music_chan
music_chan=aSong.Play(eAudioPriorityNormal, eOnce);
}
function room_RepExec()
{
if (RunCreditsNow) {
mouse.Mode=5; //blank action
if (oCredits.Y>=690) {
oCredits.Y-=1;
SetTimer(TIMER_WAIT_3SECONDS, GetGameSpeed()*3);
} else {
if (music_chan.PlayingClip!=aSong) {
if (IsTimerExpired(TIMER_WAIT)) {
FadeOut(10);
QuitGame(0);
}
}
}
}
}
function room_Load()
{
cJulius.Transparency=100;
cJulius.x=2000;
cJulius.y=2000;
gIconbar.Clickable=false;
gIconbar.Visible=false;
mouse.Mode=5;
SetGameOption(OPT_CROSSFADEMUSIC, 0); //set crossfade to 'no crossfade' for music_chan
music_chan=aTitleTheme_1_6_1.Play(eAudioPriorityNormal, eOnce);
}
function room_RepExec()
{
if (oCredits.Y>=850) {
oCredits.Y-=1;
} else {
if (music_chan.PlayingClip!=aTitleTheme_1_6_1) {
SetTimer(TIMER_WAIT, GetGameSpeed()*2);
if (IsTimerExpired(TIMER_WAIT)) {
FadeOut(5);
sounds_chan=aBlowing_out_a_match_2.Play(eAudioPriorityNormal, eOnce);
QuitGame(0);
}
}
}
}
SetTimer(TIMER_WAIT, GetGameSpeed()*2);
if (IsTimerExpired(TIMER_WAIT)) {
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.051 seconds with 14 queries.