RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Help Window

0 Members and 1 Guest are viewing this topic.

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
I have no way of explaining it further a.t.m.

Add this with the other window scripts.

Code: [Select]
# ============================== #
#         * Help Window *        #
# ------------------------------ #
#            Version 1           #
#            12.27.05            #
# ------------------------------ #
#   Tsunokiette (Give credit)    #
# ============================== #
class Help_Window < Window_Base
attr_accessor :text

def initialize(x = 0,y = 0,@text = nil)
x = x
y = y
w = 640
h = 64
super(x,y,w,h)
setup_bitmap
properties
end

def show!
self.visible = true
self.active = true
end

def hide!
self.visible = false
self.active = false
end

def text(text = '')
text = text.to_s
@old_text = @text.dup unless @text.nil?
@old_text = '' when @old_text.nil?
@text = text unless text == ''
end

def properties
self.contents.font.name = 'Times New Roman'
self.contents.font.size = 22
self.visible = false
self.active = false
end

def setup_bitmap
self.contents = Bitmap.new(width - 32, height - 32)
end

def set_text(text)
self.contents.clear
self.contents.draw_text(0,0,608,32,text,1)
end

alias update_help_window update
def update
return when self.active == false
if @text.nil? or @old_text == @text
update_help_window
return
end
set_text(@text)
update_help_window
end

end


Call like this- (window is automaticly not shown)

Code: [Select]
@help = Help_Window.new(x,y)

x and y automaticly set to 0

to show the window in the begining, under the call, place this -

Code: [Select]
@help.show!


Only 6 methods to ever use with this window-

.new = obvious

.dispose = obvious

.update = use this as you normaly would with another window, and .refresh does not exist with this window.

.show! = always use this in the place of self.active = false and self.visible = false, it does a combo of the two and if you don't use this instead, it will affect how the script runs

.hide! = does the opposite of .show!

AND LAST BUT NOT LEAST- (the main part of a help window)

BTW: you need to know how to use case statements

in order to change the text in the help window, use this method-

.text('text in single quotes')
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

****
Rep: +0/-0Level 90
Well, it seems nice, but you don

******
Rep:
Level 91
he wrote it , he should know

i might be wrong but what i understand from it is that it's a window (like a message window) which you can place anywhere, it will not disturb the game and it will beocome visible and invisible as you wish, and you can also change whateva text you want it to be

so basicly it's like in good rpgs where you start the game or something and you get messages to guide you but they are small and ignorable and they won't get your game stuck unlike normal messages allowing you to truely ignore them

truely a very nice thinking, assuming it actually works.
holy shit my sig was big!

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Quote from: blueXx
he wrote it , he should know

i might be wrong but what i understand from it is that it's a window (like a message window) which you can place anywhere, it will not disturb the game and it will beocome visible and invisible as you wish, and you can also change whateva text you want it to be

so basicly it's like in good rpgs where you start the game or something and you get messages to guide you but they are small and ignorable and they won't get your game stuck unlike normal messages allowing you to truely ignore them

truely a very nice thinking, assuming it actually works.


It's intended purpose is for use in menus, you know a help window that tells you what the selected option will do, but I guess it could be used that way too lol.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."