- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
mellowninja · Apr 01, 2012 at 05:15 PM ·
guibuttonsliderprivate
Gui script help
these are the consts
private const int offSet = 5;
private const int Line_Height = 20;
private const int Stat_Label_Width = 100;
private const int Base_Label_Width = 30;
private const int Button_Width = 20;
private const int Button_Height = 20;
private int statStartingPos = 40;
This is what i'd like to change into a HorizontallSlider
How would i implement a slider instead of a button to change the values ?
if(GUI.Button(new Rect(offSet + Stat_Label_Width + Base_Label_Width, statStartingPos + (cnt * Button_Height), Button_Width, Button_Height), "-")) {
if(_toon.GetPrimaryAttribute(cnt).BaseValue > Min_Starting_Attribute_Value) {
_toon.GetPrimaryAttribute(cnt).BaseValue--;
pointsLeft++;
_toon.StatUpdate();
Any help would be great i apologize for posting a lot of scripting questions but how else am i mean't to learn
MellowNinja
Comment