Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vb6 and variable reference

Started by md_lasalle May 14, 2004 at 1:52 PM 0 replies 200+ views
Original Post
md_lasalle
md_lasalle
Hi, i have an object(clsLabel) that renders some text on each cycle. when i create the object i wanna be able to pass some property reference so that if the property changes,the text to render from my clsLabel will change. for exemple: dim Label as clsLabel ''new clsLabel object Label.create Engine.FPS ''I wanna pass the engine.fps reference so that if the FPS changes, the label will render the new value of engine.fps ''this would be the render method of my clsLabel object public sub Render() textToDraw = cstr(SomeKindOfObjectReference)''here is the prob D3DX.DrawText MainFont, color, textToDraw, BoundRect, DT_LEFT end sub ''so when the label is initilized, I wanna be able to save the adress of the engine.fps property so that on each cycle, it renders the right value. I know we''re not in C++ and that vb has no support for pointers, but does anyone has any idea on how to do this?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.