[Ace] Fullscreen++ and Amaranth's Super Simple Mouse System Ace

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Hello everyone,

I've spent a while on the forums looking for a solution, but even though I found some discussions of similar issues, none of them were of much help.

I'm having trouble making "Amaranth's Super Simple Mouse System Ace" by Shaz (http://pastebin.com/TxKQa3WK) work together with "Fullscreen++" script by Zeus81 (http://pastebin.com/raw.php?i=kc1hzBek).

The mouse cursor is there and it works, but whenever I switch the fullscreen mode to anything different from the native RMVXA resolution (by pressing F6), the cursor reverts to Windows system pointer when leaving any edge of the game screen except the top. This renders the mouse system only semi-usable.

I've uploaded a short video here, I hope it helps: https://www.dropbox.com/s/7qlcym70vpbmxnu/Mouse%20bug%20-%20fullscreen.mp4?dl=0

Happens in windowed mode as well, but it's less frustrating because you can see the desktop and it's not as disorienting.

The best solution I see would be to prevent the cursor from leaving the game window ("game area" if in fullscreen) at all, but since I couldn't code my way out of a broom closet I obviously need some help.

Thank you in advance!
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
That's a problem I've found too, and I couldn't fix it as well.

This fullscreen script only does a zoom on the window, so the mouse cursor is not limited to the displayed space and, if you move outward that space, the Windows cursor can appear instead of the game cursor.

It doesn't happen in the "classic" fullscreen mode since then Windows restricts the display space to the actual focused window instead of just zooming.
 

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Last edited by a moderator:

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
They all lose the mouse unfortunately, when you go to the far right or bottom.

But maybe there's a way to limit the mouse movement. I'll take a look at both Shaz and Jet's scripts and see if I can find something, although I'm only a pretty average scripter.

Edit: For the moment, I got a system that reinitialize the mouse cursor position to an arbitrary location inside the screen space when Fullscreen is active (with Jet's script).

I'll see if I can get a better fix.

Edit2: Got it for Shaz's script as well, in its crude form like for Jet's. Still working on it.
 
Last edited by a moderator:

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
They all lose the mouse unfortunately, when you go to the far right or bottom.

[...]
Not really, at least the Windows pointer doesn't show, and in Vlue's case the in-game cursor never disappears from the screen, even if you move it to the far right/bottom. It does "stick" there a bit because the actual cursor is by then out of bounds and invisible, but at least the confusion factor is reduced.

Thank you very much for looking into this! I hope you find a solution =)
 
Last edited by a moderator:

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
Actually, I'm now facing the opposite problem with Shaz's script: the mouse cursor no longer wants to leave the screen space, even in windowed mode. :dizzy:
 

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Wait, this is perfect! Do want! XD
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,353
Reaction score
2,549
First Language
French
Primarily Uses
RMVXA
Really?
I find it annoying not to be able to free the cursor in windowed mode. You have to ALT-TAB to do something else.


Anyway, here are my modifications for Shaz's mouse script:
I don't know if I can paste the entire script here, so I'm only posting my fix.
It's very crude, be warned not to take it as an optimized fix!

After line 274 (@sys_cursor_visible = false):


SetCursorPos = Win32API.new('user32', 'SetCursorPos', 'nn', 'n')
GetWindowRect = Win32API.new('user32', 'GetWindowRect', 'lp', 'i')
GetClientRect = Win32API.new('user32', 'GetClientRect', 'lp', 'i')
a = Win32API.new('kernel32', 'GetPrivateProfileString', 'pppplp', 'l')
b = Win32API.new('user32', 'FindWindow', 'pp', 'i')
a.call("Game", "Title", "", title = "\0" * 256, 256, ".//Game.ini")
@handle = b.call("RGSS Player", title.unpack("C*").collect {|a| a.chr }.join.delete!("\0"))
Win32API.new('user32', 'ShowCursor', 'i', 'i').call(0)

def self.area?(x, y, width, height)
@pos[0].between?(x, width + x) && @pos[1].between?(y, height + y)
end


def self.client_size2
rect = [0, 0, 0, 0].pack('l4')
GetClientRect.call(@handle, rect)
right,bottom = rect.unpack('l4')[2..3]
return right, bottom
end

def self.set_pos(x_pos = 0, y_pos = 0)
width,height = client_size2
if (x_pos.between?(0, width) && y_pos.between?(0, height))
SetCursorPos.call(client_pos[0] + x_pos,client_pos[1] + y_pos)
end
end

def self.client_pos
rect = [0, 0, 0, 0].pack('l4')
GetWindowRect.call(@handle, rect)
left, upper = rect.unpack('l4')[0..1]
return left + 4, upper + 30
end
and another part after line 384 (that is, 384 after you pasted the above lines, else it's line 348 - it's after the "# Leaving / Entering Range?" section):
if area?(0, 0, 544, 416)
then #nothing
else set_pos(16,16)
end

I've set the reset position for the cursor at 16, 16 but you can change it to anything you want inside the window.



Edit: I've just found a simple way to test if I'm in windowed mode or fullscreen.
Assuming no one has a screen smaller than 544 pixels in width (which should be everybody :) )
Replace part 2 of my script fix above by this:
if client_size2[0] > 544
then
if area?(0, 0, 544, 416)
then #nothing
else set_pos(16,16)
end
end
 
Last edited by a moderator:

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Hello!

Sorry for the late reply, just got around to testing your fix. It works, but to be honest I'm not too sure what's less confusing - having the mouse leave the screen or jump back to certain point whenever it does =)

In any case, thank you for the fix!
 

astracat111

Astra Cat
Veteran
Joined
Jun 16, 2015
Messages
207
Reaction score
117
First Language
English
Primarily Uses
I have just fixed the mouse script for use with Fullscreen++ by creating a game launcher. I'll release it for you to use once I figure out how to use hooks to disable F1, F12 and Alt+Enter keys.
 

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Hi!

That's an interesting approach, would love to try it out!
 

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,721
Reaction score
1,200
First Language
Greek
Primarily Uses
RMVXA
Last edited by a moderator:

Madlark

Villager
Member
Joined
Dec 20, 2014
Messages
10
Reaction score
2
First Language
Russian
Primarily Uses
Thank you for the suggestion (I wasn't aware Dekita also had a mouse script), but unfortunately a menu-only mouse is not an option for me, since I would like the player to be able to control the character's movement and interactions via mouse as well.
 
Last edited by a moderator:

astracat111

Astra Cat
Veteran
Joined
Jun 16, 2015
Messages
207
Reaction score
117
First Language
English
Primarily Uses
Thank you for the suggestion (I wasn't aware Dekita also had a mouse script), but unfortunately a menu-only mouse is not an option for me, since I would like the player to be able to control the character's movement and interactions via mouse as well.
Exactly. I'll pm you with what I've got when I wake up tomorrow. I'm working on some other really neat things and just making some good progress with it. Will release it all when I'm finished with this stuff.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top