Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Help! Scale object and Blue Gui

Author
Message
tatts
18
Years of Service
User Offline
Joined: 13th Jan 2006
Location: Ontario,Canada
Posted: 23rd Mar 2007 00:37 Edited at: 23rd Mar 2007 00:42
I am making a model viewer which I think is turning out for the better. Made it with four views and such. Anyway as one of the options i'd like to be able to scale the object, I set up a panel with 3 edit boxes, I've tried to figure out the code for myself and even searched for an answer. so far I have.

function eventScaleobject()
Gadget1=createPanel(2,2,105,100,0)
setPanelBorderStyle Gadget1,2
Gadget2=createEdit(22,17,75,20,0,Gadget1)
Gadget3=createEdit(22,42,75,20,0,Gadget1)
Gadget4=createEdit(22,67,75,20,0,Gadget1)
Gadget5=createLabel(7,22,50,20,"X",Gadget1)
Gadget6=createLabel(24,2,100,20,"Scale Object",Gadget1)
Gadget7=createLabel(7,47,50,20,"Y",Gadget1)
Gadget8=createLabel(7,72,50,20,"Z",Gadget1)

if eventSource()=Gadget2
if eventType()=KEYDOWN
Gadget2(eventData())
endif
endif

if eventSource()=Gadget3
if eventType()=KEYDOWN
Gadget3(eventData())
endif
endif

if eventSource()=Gadget4
if eventType()=KEYDOWN
Gadget4(eventData())
endif
endif


X# = Gadget2()
Y# = Gadget3()
Z# = Gadget4()

Position object 1,X#,Y#,Z#

I'm just starting to play with Blue gui which is why im making a model viewer but in my own way.

Any help would be apprecieated.

WindowsXP/SP2, Pentium 4 2.66 GHz, 1GB DDR Ram, Geforce 6600 256MB
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 25th Mar 2007 12:28
you probably want to use getGadgetText to get the values of the edit boxes, then scale the object using val(getgadgettext(gadget2)) etc.

Perhaps someday I will make an actual contribution to this community

Login to post a reply

Server time is: 2024-06-16 06:22:18
Your offset time is: 2024-06-16 06:22:18