Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Bitmap transparency and Skipping arguments.

Just 2 quick questions. First is: how do I skip passing an argument when using a method (I don't know if my naming of stuff is right because I'm working out ruby by messing with it... going quite well so far as I have some very basic programming experience). I'll try and explain it better with an example.

Taken from Window_gold module as an example
Code:
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)

Okay let's say I just want the height and width and to match the size of the text I'm drawing (can I do that by leaving it blank?) and I want the text to be left aligned. I'm not to sure about the width and height arguments but the alignment ones default is left aligned so I don't want to pass an argument to it so how do I skip that argument... if I just leave it blank it gives me an error.

And second question I don't know if it's a scripting issue but I think it is. I have a bitmap image I have imported and want to know how to choose its transparent color. How do I do this?

Help is much appreciated. Thanks.
 

Vent

Member

Slipknot;247317 said:
When you import a bitmap, you click the color you want to be trasnparent :)
About the arguments... what do you need? O_o

They are talking about the window background bitmap. You know, the sheet that can have text or other things drawn on it in a window...
 
What would I do if I wanted to leave an argument blank in the middle?

Also it was just a normal picture I imported which I want to have as the background for my menu and since I'm on my way with the menu system itself I'm needing to move onto the bits where transparency of the following pink squares are needed.

Here's a pic of my current in working menu system with the pink squares that need making transparent.


EDIT: It's okay now I found out it was because I was importing it as a JPG instead of a PNG.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top