Show posts

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

Topics - vga256

After reading this post on mouse cursor looping I went ahead and tried to replicate the same behaviour using the latest build of AGS 3.5.1. It no longer appears to work - the mouse wait cursor continues to reset itself to the first frame when a new Wait(x) is called.

I also noticed that when the animation runs, it "hiccups" and skips between frames. It appears as if the engine is competing with itself for the View's graphic property - sometimes the (below script's) scripting code "wins" and sets the graphic property, other times the view's default animation "wins" and sets the graphic property. Is there a chance that the engine's graphics execution order (or script execution order?), or something else has changed since this code was written in 2014?

Have I missed something obvious?

Update: cause of the problem found. See my response below.

Code below. I have ensured that the correct View is being used, as well as wait delay, frames and sprite numbers.
Code: ags

(at top of script)
// mouse wait cursor
int cursorWaitView = MOUSEWAIT; //view of your cursor
int cursorWaitDelay = 5; //animation delay of your cursor
int cursorWaitFrames = 8; //number of animated frames
int cursorWaitFirstSlot = 21; //ID of the first frame
int cursorWaitCounter; // maintain a counter for the cursor

function UpdateMouseWaitCursor()
  if (!IsInterfaceEnabled())
    cursorWaitCounter = (cursorWaitCounter + 1) % (cursorWaitDelay * cursorWaitFrames);

    ViewFrame* vf = Game.GetViewFrame(cursorWaitView, 0, 0);
    vf.Graphic = cursorWaitFirstSlot + cursorWaitCounter / cursorWaitDelay;

function repeatedly_execute_always()
I've been building a windowing system for a game I'm working on, and I've got most of the window behaviour worked out. Windows can stack, push to the front, etc.

One very specific requirement I have is that Rooms must be shown inside of windows. For that, I've been using the new Camera/Viewport system that CW designed.
Now, I understand that putting a Room "inside of" a GUI window frame is not the intended use of rooms, but I've worked around that by creating a GUI composed of a window frame with a transparent box inside. Currently, the Room viewport sits inside of the GUI frame, and works perfectly.

The problem I'm having is that, from what I can see, AGS internally renders all GUIs on top of Rooms, regardless of the z-order. There does not appear to be a "global z-order" that sets the stacking order of all rendered GUIs, Overlays, Rooms, Objects, etc. The outcome of this is that when I drag the Room window on top of a GUI, the GUI stays on top. As you can see in the attached image, the file transfer GUI is on top of the Room viewport (correct), but the modem dialer is also on top of the room window (incorrect).

tldr: Can someone think up a workaround that would allow me to push a Room viewport on top of a GUI?

After recently discovering that 3.5.x has had theming for a long time, I decided to port my favourite VS/Notepad++/everything-else theme "Dracula" to the AGS Editor, in time for Halloween! :)

Dracula is meant to be gentler on the eyes than the current AGS VisualStudio Dark theme, using lower contrast highlights and softer background colours. The entire AGS editor has been recolored, including the scripting boxes - with some exceptions, see below.

Please let me know if you run into any strange coloration or visual anomalies. I have tested this with v3.5.0.x.

Version 0.2

Download here.

1. Browse to AGS Editor -> File -> Preferences -> Color Theme -> Import Color Theme.
2. Select AGS-Dracula-version.json in your downloads folder.
3. Restart AGS.

Known Issues
- Combo Boxes are missing the proper dropdown arrow colour. This bug has already been reported.
- Frames, Panels, Scrollbars, Textboxes, and certain buttons could not be recolored according to the theme, so they remain white. I am assuming these are tied to default Windows System/winforms theming that I have no control over. Please let me know if you've got a workaround.
- Hyperlinks on the Welcome page are not colourized properly for AGS 3.5.0. This problem was patched in March 2021, so recent versions (latest 3.5.1) of the Editor should look fine.
SMF spam blocked by CleanTalk