Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Window cursor rect
Feoden
post Jan 27 2012, 12:26 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 66
Type: Scripter
RM Skill: Skilled




I have a question.
I have created some scripts where you have to fill a window_selectable with some rectangles, i.e. using the command bitmap.fill_rect.
However when i create shapes in the window, the cursor vanishes below them.
Why does it so?
Is there a way to fill a window with pictures and at the same time let the cursor move ABOVE them?


__________________________
- Drown into eyes while they're still blind... -

Go to the top of the page
 
+Quote Post
   
Kread-EX
post Jan 27 2012, 12:33 PM
Post #2


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




It would be easier to pinpoint the problem if we could see your code.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Feoden
post Jan 29 2012, 05:59 AM
Post #3


Level 5
Group Icon

Group: Member
Posts: 66
Type: Scripter
RM Skill: Skilled




Well I think this is a matter of the window itself and not of a specific code...
Anyway this is what happens:
I draw a rectangular with a given color, and the cursor vanishes below.
I tried to change the color.alpha to 200 and then the cursor is visible again, but very dimy. So there must happen that the window first draws the Rect containing the cursor, and then applies the other colored Rect.
I wondered, is there a way to rewrite the cursor above them (such as redeclaring it) instead of modifying the transparency of the colors?

CODE
this is the command I call:
    self.contents.fill_rect(rect,@Colors[color_index])
[....]
and this is the update_cursor:
  def update_cursor_rect
    x = @D*(@RW+self.index%@bitmap.width)-self.ox
    y = @D*(@DW+self.index/@bitmap.width)-self.oy
    self.cursor_rect.set(x, y, @D, @D)      
  end


This post has been edited by Feoden: Jan 29 2012, 06:03 AM


__________________________
- Drown into eyes while they're still blind... -

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 10:13 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker