Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - pmiloslavsky

#1
I replaced the cached themes directory with the 1.0 one, but I'm still not sure whats going wrong in BabyBlue:

  tgui::Theme theme;
  theme.load("..\\..\\..\\themes\\BabyBlue.txt");
  //tgui::Theme::setDefault("..\\..\\..\\themes\\BabyBlue.txt");
  tgui::Theme::setDefault(make_shared<tgui::Theme>(theme));

If I pass Black.txt here everything works so the theme has some bug?
#2
Yes that was it, thank you again. I was using BabyBlue potentially from tgui 0.8

Quote// Theme based on http://dribbble.com/shots/635698-UI-Kit-Baby-Blue

Button {
    Texture      = "BabyBlue.png" Part(269, 40, 90, 60) Middle(30, 0, 30, 60);
    TextureHover = "BabyBlue.png" Part(361, 40, 90, 60) Middle(30, 0, 30, 60);
    TextureDown  = "BabyBlue.png" Part(177, 40, 90, 60) Middle(30, 0, 30, 60);
    TextColor    = rgb(100, 100, 100);
}


ChatBox {
    BackgroundColor = rgb(210, 210, 210);
    BorderColor     = White;
    Borders         = (2, 2, 2, 2);
    Scrollbar       = &Scrollbar;
}

CheckBox {
    TextureChecked   = "BabyBlue.png" Part(48, 40, 34, 36);
    TextureUnchecked = "BabyBlue.png" Part(381, 2, 31, 31);
    TextColor        = rgb(100, 100, 100);
}

ChildWindow {
    TextureTitleBar        = "BabyBlue.png" Part(317, 2, 62, 31) Middle(10, 0, 42, 31);
    TitleColor             = rgb(100, 100, 100);
    BackgroundColor        = rgb(230, 230, 230);
    BorderColor            = White;
    Borders                = (2, 0, 2, 2);
    DistanceToSide         = 3;
    PaddingBetweenButtons  = 1;
    ShowTextOnTitleButtons = false;

    CloseButton = {
        Texture      = "BabyBlue.png" Part(96, 2, 25, 25);
        TextureHover = "BabyBlue.png" Part(123, 2, 25, 25);
        TextureDown  = "BabyBlue.png" Part(150, 2, 25, 25);
    }

    MaximizeButton = {
        Texture      = "BabyBlue.png" Part(2, 90, 25, 25);
        TextureHover = "BabyBlue.png" Part(29, 90, 25, 25);
        TextureDown  = "BabyBlue.png" Part(56, 90, 25, 25);
    }

    MinimizeButton = {
        Texture      = "BabyBlue.png" Part(83, 90, 25, 25);
        TextureHover = "BabyBlue.png" Part(110, 90, 25, 25);
        TextureDown  = "BabyBlue.png" Part(137, 90, 25, 25);
    }
}

ComboBox {
    TextureArrow     = "BabyBlue.png" Part(177, 2, 20, 26);
    BackgroundColor  = rgb(210, 210, 210);
    TextColor        = rgb(100, 100, 100);
    BorderColor      = White;
    Borders          = (2, 2, 2, 2);
    ListBox          = &ListBox;
}

EditBox {
    Texture                     = "BabyBlue.png" Part(103, 40, 72, 48) Middle(24, 0, 24, 48);
    TextColor                   = rgb(100, 100, 100);
    SelectedTextColor           = rgb(150, 150, 150);
    SelectedTextBackgroundColor = rgb(190, 225, 235);
    CaretColor                  = rgb(145, 180, 190);
    Padding                     = (14, 4, 14, 4);
}

Label {
    TextColor = rgb(100, 100, 100);
    Scrollbar = &Scrollbar;
}

ListBox {
    BackgroundColor         = rgb(210, 210, 210);
    TextColor               = rgb(100, 100, 100);
    SelectedBackgroundColor = rgb(190, 225, 235);
    SelectedTextColor       = rgb(150, 150, 150);
    BorderColor             = White;
    Borders                 = (2, 2, 2, 2);
    Scrollbar               = &Scrollbar;
}

MenuBar {
    BackgroundColor         = rgb(210, 210, 210);
    TextColor               = rgb(100, 100, 100);
    SelectedBackgroundColor = rgb(190, 225, 235);
    SelectedTextColor       = rgb(150, 150, 150);
    DistanceToSide          = 5;
}

MessageBox {
    Button    = &Button;
    TextColor = rgb(100, 100, 100);

    TextureTitleBar = "BabyBlue.png" Part(317, 2, 62, 31) Middle(10, 0, 42, 31);
    TitleColor      = rgb(100, 100, 100);
    BackgroundColor = rgb(230, 230, 230);
    BorderColor     = White;
    Borders         = (2, 0, 2, 2);
    DistanceToSide  = 3;

    CloseButton = {
        Texture      = "BabyBlue.png" Part(96, 2, 25, 25);
        TextureHover = "BabyBlue.png" Part(123, 2, 25, 25);
        TextureDown  = "BabyBlue.png" Part(150, 2, 25, 25);
    }
}

Panel {
    BackgroundColor = rgb(230, 230, 230);
}

ProgressBar {
    TextureBackground  = "BabyBlue.png" Part(221, 2, 30, 30) Middle(10, 0, 10, 30);
    TextureFill        = "BabyBlue.png" Part(70, 2, 24, 24) Middle(7, 0, 7, 24);
    TextColor          = rgb(100, 100, 100);
}

RadioButton {
    TextureChecked   = "BabyBlue.png" Part(253, 2, 30, 30);
    TextureUnchecked = "BabyBlue.png" Part(285, 2, 30, 30);
    TextColor        = rgb(100, 100, 100);
}

Scrollbar {
    TextureTrack     = "BabyBlue.png" Part(432, 2, 16, 32);
    TextureThumb     = "BabyBlue.png" Part(414, 2, 16, 32);
    TextureArrowUp   = "BabyBlue.png" Part(2, 2, 16, 16);
    TextureArrowDown = "BabyBlue.png" Part(20, 2, 16, 16);
}

Slider {
    TextureTrack = "BabyBlue.png" Part(38, 2, 30, 20) Middle(10, 0, 10, 20);
    TextureThumb = "BabyBlue.png" Part(84, 40, 17, 38);
}

SpinButton {
    TextureArrowUp   = "BabyBlue.png" Part(2, 2, 16, 16);
    TextureArrowDown = "BabyBlue.png" Part(20, 2, 16, 16);
}

Tabs {
    TextureTab         = "BabyBlue.png" Part(450, 2, 44, 36) Middle(4, 3, 36, 30);
    TextureSelectedTab = "BabyBlue.png" Part(2, 40, 44, 36) Middle(4, 3, 36, 30);
    TextColor          = rgb(100, 100, 100);
    SelectedTextColor  = rgb(150, 150, 150);
    DistanceToSide     = 5;
}

TextBox {
    BackgroundColor             = rgb(210, 210, 210);
    TextColor                   = rgb(100, 100, 100);
    SelectedTextColor           = rgb(150, 150, 150);
    SelectedTextBackgroundColor = rgb(190, 225, 235);
    CaretColor                  = rgb(145, 180, 190);
    BorderColor                 = White;
    Borders                     = (2, 2, 2, 2);
    Scrollbar                   = &Scrollbar;
}

Tooltip {
    TextColor       = rgb(100, 100, 100);
    BackgroundColor = rgb(210, 210, 210);
    BorderColor     = rgb(255, 255, 255);
    Borders         = (1, 1, 1, 1);
    Padding         = (2, 2, 2, 2);
}

#3
Yes it works when I do setText, but its not ideal since i'm trying to get people to type a big decimal number in there and when they go to edit, they would be editing the dec triple string.
I think the fact that setText works eliminates all 3 theories above. I am using SFML 2.6 on windows
#4
QuoteeditBox = tgui::EditBox::create();
  editBox->setSize(100, 20);
  editBox->setTextSize(14);
  editBox->setPosition("parent.left + 1200", "parent.bottom - 300");
  editBox->setDefaultText("dec triple");
  pgui->add(editBox, "interior_color_adjust");
  editBox->onTextChange(signalIntColorAdj, p_model, pgui);
  editBox->setDefaultText("dec triple");

I don't see the text "dec triple" when the gui starts up. Do you have any idea why?
I don't do anything to the box, except hide all widgets sometimes.
#5
Thank you for the explanation. Its working now.
#6
How do I have my own custom signal for EditBox with 2 parameters, and what the text changed to on the end in the last parameter?

 auto editBox = tgui::EditBox::create();
 editBox->onTextChange(signalPower, p_model, pgui);

in signalPower I want to see the value of the text.
Do I need to pass editBox and then call getText() inside signal?

In the 0.8 old way the const String was a last implicit parameter.