draw over the window frame + extra line to window_selectable

xDGameStudios

Veteran
Veteran
Joined
Sep 15, 2012
Messages
102
Reaction score
60
First Language
Portuguese
I'm trying to create 2 things and I'm having big trouble identifying and understanding the right place where the code is.
the first thing I'm trying to do is to draw a sprite on the top of the window frame (top left corner, not in the first row of the window... really on top of the frame :) I don't know what are the functions to be changed to create this effect.

another thing is the extra text line on a selectable_window, by default the selectable window is something like:
 

______________________| Item 1| Item 2| Item 3| Item 4| ....I wanted to create this:

 

______________________| This is an extra line| Item 1| Item 2| Item 3| Item 4| ....that line won't be scrolling like the rest of the window of corse :) and once again... I think what I need is related to the first question.. I need to push down the contents bitmap by a line and draw new sprite on the first row...
I admit it this is not a technical javascript question so I don't know if it belongs to this forum once again.. I don't know which methods should I look at :)
 
 

xDGameStudios

Veteran
Veteran
Joined
Sep 15, 2012
Messages
102
Reaction score
60
First Language
Portuguese
There's a work around I thought of... drawing it in different windows.. one small window (without windowskin) on the top left of the main window... and the extra line question the same: one bigger window (one line higher) and one smaller window (no windowskin) containing the items pretending to be inside. (you do understand what I mean don't you? xD
 
Last edited by a moderator:

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
424
Reaction score
171
First Language
Dutch
Primarily Uses
RMMV
I would probably just draw it inside the refresh method of the window like so:

this.contents.blt(..) // see helpfile: Bitmap.bltalias this method: Window_Selectable.prototype.refresh()

The 2nd question is basically the same as the first. Extend that same refresh function and draw whatever you want.

Also you gotta alias Window_Selectable.prototype.itemRect() and increase the rect.y a bit to prevent the items from getting drawn on top of your line depending on window spacing.

Not sure why you would want to do this though because it's gonna change every single window_selectable including those used by other scripters and it will cause bugs. You should probably create your own window and derive it from Window_Selectable instead.

I'm not sure if you are a coder/scripter but if not I would suggest going here:

http://forums.rpgmakerweb.com/index.php?/forum/136-js-plugin-requests/

or here:

http://forums.rpgmakerweb.com/index.php?/forum/79-classifieds-requests/
 
Last edited by a moderator:

xDGameStudios

Veteran
Veteran
Joined
Sep 15, 2012
Messages
102
Reaction score
60
First Language
Portuguese
I would probably just draw it inside the refresh method of the window like so:

this.contents.blt(..) // see helpfile: Bitmap.bltalias this method: Window_Selectable.prototype.refresh()

The 2nd question is basically the same as the first. Extend that same refresh function and draw whatever you want.

Also you gotta alias Window_Selectable.prototype.itemRect() and increase the rect.y a bit to prevent the items from getting drawn on top of your line depending on window spacing.

Not sure why you would want to do this though because it's gonna change every single window_selectable including those used by other scripters and it will cause bugs. You should probably create your own window and derive it from Window_Selectable instead.

I'm not sure if you are a coder/scripter but if not I would suggest going here:

http://forums.rpgmakerweb.com/index.php?/forum/136-js-plugin-requests/

or here:

http://forums.rpgmakerweb.com/index.php?/forum/79-classifieds-requests/
overriding the refresh method DOESN'T WORK... will cause it to draw on the first row.. because the contents bitmap is the size of the inner window.. and doesn't overlap the window frame. What I'm doing right now is creating a sprite and adding it to the scene as a child placed over the window... Code wise it isn't beautiful xD that's why I asked :D thank you for you help!

I gave the example of Window_Selectable.. of course I'm creating my own window :)
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
424
Reaction score
171
First Language
Dutch
Primarily Uses
RMMV
Please share some code? Just saying it doesn't work still tells me nothing. Because I know it works because I did it several times already.

Also the window-contents DOES overlap the entire window if you do it right, did you account for the window padding? This can be seen in my minimap plugin:

http://s21.postimg.org/q1bx51tc7/mmsample3.png

it shows both the window-skin-border and the overlay on top of each other. So that is proof it works.

Creating a sprite works... It's ugly and may cause some z-index issues in some cases but hell it works.
 
Last edited by a moderator:

xDGameStudios

Veteran
Veteran
Joined
Sep 15, 2012
Messages
102
Reaction score
60
First Language
Portuguese
Please share some code? Just saying it doesn't work still tells me nothing. Because I know it works because I did it several times already.

Also the window-contents DOES overlap the entire window if you do it right, did you account for the window padding? This can be seen in my minimap plugin:

http://s21.postimg.org/q1bx51tc7/mmsample3.png

it shows both the window-skin-border and the overlay on top of each other. So that is proof it works.

Creating a sprite works... It's ugly and may cause some z-index issues in some cases but hell it works.
this.contents = new Bitmap(this.contentsWidth(), this.contentsHeight());this is the window inner size!!! I don't wanna change the contents bitmap size as all RPG Maker MV functions drawText.. drawItem.. depend on it... the window this.drawText() function would start drawing text on the wrong place and so on.

My idea was to change as little as possible... for example drawing your name on the top left corner of every selectable window (over the window frame) in the game keeping everything else in place :)
 

SilverDash

Veteran
Veteran
Joined
Oct 11, 2015
Messages
424
Reaction score
171
First Language
Dutch
Primarily Uses
RMMV
I told you before:

did you account for the window padding?
Window_Base.prototype.contentsWidth = function() { return this.width - this.standardPadding() * 2;};So:

this.standardPadding = 0;Explore Window_Base a bit more and you will see how it works.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,017
Messages
1,018,356
Members
137,802
Latest member
rencarbali
Top