HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Color Slides Broke

Go down 
AuthorMessage
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 76
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Color Slides Broke   Tue Jan 16, 2018 5:12 am

I tried to use the Red color slider and it makes the character increase or decrease in size.. the size slider soesnr doe anything. What do I do..?
Back to top Go down
http://mythical-realms.freeforums.net
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 529
Join date : 2014-02-09
Age : 20

PostSubject: Re: Color Slides Broke   Tue Jan 16, 2018 5:17 am

we cant help you without context. what did you change?

________________________________
Back to top Go down
http://azoptaos.boards.net/
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 76
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Color Slides Broke   Tue Jan 16, 2018 12:14 pm

Hyper wrote:
we cant help you without context. what did you change?
07:12:30


Hey Hyper,

The only thing I could thing of that could have broken it would have been when I tried to add

http://www.kitopen.com/t3557-more-different-size-values-according-the-rank

Im guessing that when I undid it all because something didnt work I may have added a bracket. I would actually like for it to work so maybe it could fix it.

Code:
void updateSliders(const Real &one, const Real &two, const Real &three)
 {
 if(page==PAGE_CUSTOM4)
 {
 colourVal[colourPartID].r = one;
 colourVal[colourPartID].g = two;
 colourVal[colourPartID].b = three;
 }
 else if(page==PAGE_CUSTOM5 || page==PAGE_PRESET3)
      {
         const Real tScale = 0.25 + (page==PAGE_PRESET2?two:one)*1.25;
         mUnit->getObjectNode()->setScale(tScale,tScale,tScale);
      }
      refreshPage();
   }
   void getSliderValue(Real &one, Real &two, Real &three)
   {
      if(page==PAGE_CUSTOM4)
      {
         one = colourVal[colourPartID].r;
         two = colourVal[colourPartID].g;
         three = colourVal[colourPartID].b;
      }

This is what this section of the code looks like right now.. Thank you


PS>> I added the code that I linked in another post and now none of the sliders work for color and the sizer does do anything
Back to top Go down
http://mythical-realms.freeforums.net
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 529
Join date : 2014-02-09
Age : 20

PostSubject: Re: Color Slides Broke   Tue Jan 16, 2018 3:27 pm

your page custom numbers are one too big...dunno if that's intentional because of a body selector? otherwise id need to see the rest of your getSliderValues function

if you have a body selector, use revs code but increase the PAGE_CUSTOM by 1 to account for the extra body page

________________________________
Back to top Go down
http://azoptaos.boards.net/
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 76
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Color Slides Broke   Tue Jan 16, 2018 4:47 pm

Hyper wrote:
your page custom numbers are one too big...dunno if that's intentional because of a body selector? otherwise id need to see the rest of your getSliderValues function

if you have a body selector, use revs code but increase the PAGE_CUSTOM by 1 to account for the extra body page

heres the code
Code:
void updateSliders(const Real &one, const Real &two, const Real &three)
   {
      if(page==PAGE_CUSTOM3)
      {
         colourVal[colourPartID].r = one;
         colourVal[colourPartID].g = two;
         colourVal[colourPartID].b = three;
      }
      else if(page==PAGE_CUSTOM4 || page==PAGE_PRESET2)
      {
         if (mDef->isAdmin)
         {
         const Real tScale = ADMINMINSIZE + (page==PAGE_PRESET2?two:one)*ADMINMAXSIZE;
         mUnit->getObjectNode()->setScale(tScale,tScale,tScale);
         }
         else if (mDef->isMod)
         {
         const Real tScale = MODMINSIZE + (page==PAGE_PRESET2?two:one)*MODMAXSIZE;
         mUnit->getObjectNode()->setScale(tScale,tScale,tScale);
         }
         else
         {        
            const Real tScale = USERMINSIZE + (page==PAGE_PRESET2?two:one)*USERMAXSIZE;
         mUnit->getObjectNode()->setScale(tScale,tScale,tScale);
         }
      }
      refreshPage();
   }
   void getSliderValue(Real &one, Real &two, Real &three)
   {
      if(page==PAGE_CUSTOM3)
      {
         one = colourVal[colourPartID].r;
         two = colourVal[colourPartID].g;
         three = colourVal[colourPartID].b;
      }
      else if(page==PAGE_CUSTOM4)
      {
         if (mDef->isAdmin)
         {
            one = (mUnit->getObjectNode()->getScale().x-ADMINMINSIZE)/ADMINMAXSIZE;
         }
         else if (mDef->isMod)
         {
            one = (mUnit->getObjectNode()->getScale().x-MODMINSIZE)/MODMAXSIZE;
         }
         else
         {
         one = (mUnit->getObjectNode()->getScale().x-USERMINSIZE)/USERMAXSIZE;
         }
      }
      else if(page==PAGE_PRESET2)
      {
         if (mDef->isAdmin)
         {
            two = (mUnit->getObjectNode()->getScale().x-ADMINMINSIZE)/ADMINMAXSIZE;
         }
         else if (mDef->isMod)
         {
            two = (mUnit->getObjectNode()->getScale().x-MODMINSIZE)/MODMAXSIZE;
         }
         else
         {
         two = (mUnit->getObjectNode()->getScale().x-USERMINSIZE)/USERMAXSIZE;
          }
      }
   }

so where do I change that? Im sorry.. D: and to answer it yes i have body selector
Back to top Go down
http://mythical-realms.freeforums.net
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 529
Join date : 2014-02-09
Age : 20

PostSubject: Re: Color Slides Broke   Wed Jan 17, 2018 1:48 pm

basically, the body selector adds a page, so each page== whatever has to be increased by one

ex: PAGE_CUSTOM4 becomes PAGE_CUSTOM5 etc

________________________________
Back to top Go down
http://azoptaos.boards.net/
Furrest

avatar

Game username : Furrest(Everywhere Else) / Frozenfur (Only On DD)
Server : Mythical Realms (Owner/Creator)
Female Posts : 76
Join date : 2015-11-11
Age : 16
Location : United States

PostSubject: Re: Color Slides Broke   Wed Jan 17, 2018 3:06 pm

Hyper wrote:
basically, the body selector adds a page, so each page== whatever has to be increased by one

ex: PAGE_CUSTOM4 becomes PAGE_CUSTOM5 etc

That fixed it, thank you so much Hyper
Back to top Go down
http://mythical-realms.freeforums.net
Sponsored content




PostSubject: Re: Color Slides Broke   

Back to top Go down
 
Color Slides Broke
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support :: Solved Support Issues-
Jump to: