Author Topic: Show cursor in singleplayer/Bitmap button not working  (Read 970 times)

idk if i'm getting a weird bug or if this is intentional but it seems impossible to show the cursor ingame whilst in singleplayer

i've tried using canvas.showCursor and ToggleCursor both and neither do anything

is this supposed to happen because i've never heard of this before



eughh i don't want to make another thread so soon so even though i hate doing this i'm doing a dual-question coding help topic

if it helps i promise i'll never lock this topic


I have a script making bitmap buttons on a HUD I created, and they don't appear to be working at all. The HUD is a child of newChatHud, and at one point they did work, but only on the bottom half of the button, and it only showed the _n and _d images.

Is there a minimum size for bitmap buttons to work properly? The ones I have are 10x10. This is the code creating them:
Code: [Select]
%bitmap = new GuiBitmapButtonCtrl("timelineDot_" @ %event.sid)
{
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = (%epos - 5) SPC "11";
extent = "10 10";
minExtent = "10 10";
enabled = true;
visible = true;
clipToParent = true;
bitmap = $Cutscene::Root @ getField($DMIMG, %event.good + 1);
wrap = false;
lockAspectRatio = true;
alignLeft = false;
alignTop = false;
overflowImage = false;
keepCached = false;
mColor = "255 255 255 255";
mMultiply = false;
director_event = %event;
command = "echo(" @ %event @ ");";
text = " ";
};
%bitmap.setColor($DMCOLOR_[%event.type]);
directorEventSwatch.add(%bitmap);
Director_EventKeeper.eventbitmap[%event.sid] = %bitmap;
« Last Edit: January 19, 2014, 09:13:58 PM by otto-san »

deactivatepackage(canvascursor);

make sure that you activate it again when you're done

deactivatepackage(canvascursor);

make sure that you activate it again when you're done
it seems to only work when you do this after having a GUI open
« Last Edit: January 19, 2014, 05:44:13 PM by otto-san »

Can we get a picture of what the button looks like on the parent?

It appears intentional that you cannot use your mouse in single player. Not only does calling toggleCursor() manually not work, but when you type a link into chat the message telling you to press M to click links does not appear. To work around this, just call cursorOn().


(side note, using schedule(500,0,cursorOn); may be more effective than just typing cursorOn() in console unless you use the external console)

Can we get a picture of what the button looks like on the parent?
Yeah. The only change since this picture are some colour differences and that those dots used to be bitmap instead of bitmap buttons.



It appears intentional that you cannot use your mouse in single player. Not only does calling toggleCursor() manually not work, but when you type a link into chat the message telling you to press M to click links does not appear. To work around this, just call cursorOn().


(side note, using schedule(500,0,cursorOn); may be more effective than just typing cursorOn() in console unless you use the external console)
Thanks, I'll try that. EDIT: Worked great.


EDIT:

I've gotten the buttons to work. The issue was that I was bringing the timeline dialog to the """front""" (lol) and it ended up being behind the chat, meaning that I couldn't press them because the chat text actually covered them up. This means that I'll have to think of an aesthetically pleasing way to go about making the chat readable.
« Last Edit: January 20, 2014, 11:58:25 AM by otto-san »