Template Effect without actual Templates

Started by
9 comments, last by neonfaktory 20 years, 10 months ago
OMG, I''m getting excited that I might be able to get this working!

So ALL I have to do to get this working is move:
template <class itemType>GUIT<itemType>::GUIT(eGUITYPE type, itemType* original, itemType min, itemType max){	ORIGINAL	= original;	local		= &original		// Set local val to whatever the real one currently is	MINIMUM		= min;	MAXIMUM		= max;	SetBounds(390, 290, 410, 310);	// Default Position (Center of screen)}

to the header file?? Omgomgomg, must try this when i get home from work.

@Saber: It''s hard to tell attitude online, but in the case that you are pissed or something, I really do appreciate your help. I think I''m just not totally understadnding your implementation or visa versa.

What I meant by fixed values was the "C c(101, 10);" in your code. It takes fixed ''int''s as opposed to some arbitrary game value. Thats what the whole "myShip->myStats->Thrust" was about. I''m not quite sure what you mean by "chaining object interrelationships" but just think of that as a solid value, just a plain old ''float'' variable. Now let''s say I want to make a scrollbar that directly effects THAT VALUE (sorry, dunno how to do italics here). I''d need the GUI class and it''s constructor to be able to accept floats in this case, as well as ''int''s in a different case. That''s all this is about. Thanks for taking the time to work this out with me though

Thanks to all of you guys so far, I''ll give a report if the "inline" change makes it work.
weee!

This topic is closed to new replies.

Advertisement