mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
tweaks to sliders
This commit is contained in:
@@ -37,11 +37,7 @@ void SliderField::after_reading(Version ver) {
|
|||||||
|
|
||||||
int choice_count = choices->choices.size();
|
int choice_count = choices->choices.size();
|
||||||
|
|
||||||
if (maximum < minimum) {
|
if (maximum < minimum) swap(minimum, maximum);
|
||||||
int temp = maximum;
|
|
||||||
maximum = minimum;
|
|
||||||
minimum = temp;
|
|
||||||
}
|
|
||||||
if (increment < 1) increment = 1;
|
if (increment < 1) increment = 1;
|
||||||
|
|
||||||
for (int i = minimum; i < maximum; i += increment) {
|
for (int i = minimum; i < maximum; i += increment) {
|
||||||
@@ -49,16 +45,7 @@ void SliderField::after_reading(Version ver) {
|
|||||||
}
|
}
|
||||||
choices->choices.push_back(make_intrusive<Choice>(wxString::Format(wxT("%i"), maximum)));
|
choices->choices.push_back(make_intrusive<Choice>(wxString::Format(wxT("%i"), maximum)));
|
||||||
|
|
||||||
int initial_int;
|
// Move individual choices that are numbers greater than maximum to the end
|
||||||
try {
|
|
||||||
initial_int = std::stoi(initial.ToStdString());
|
|
||||||
if (initial_int < minimum || initial_int > maximum) initial = wxString::Format(wxT("%i"), minimum);
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
initial = wxString::Format(wxT("%i"), minimum);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Move individual choices that are greater than maximum to the end
|
|
||||||
for (int i = 0; i < choice_count; ++i) {
|
for (int i = 0; i < choice_count; ++i) {
|
||||||
try {
|
try {
|
||||||
int choice_int = std::stoi(choices->choices[i].get()->name.ToStdString());
|
int choice_int = std::stoi(choices->choices[i].get()->name.ToStdString());
|
||||||
|
|||||||
@@ -33,7 +33,15 @@ void AboutWindow::onPaint(wxPaintEvent& ev) {
|
|||||||
draw(dc);
|
draw(dc);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MSE_AUTHORS[] = {"Twan van Laarhoven (twanvl)", "Sean Hunt (coppro)", "Alissa Rao (Lymia)", "haganbmj", "CaiCai (247321453)", "Olivier Bocksberger (GenevensiS)" };
|
const char* MSE_AUTHORS[] = {
|
||||||
|
"Twan van Laarhoven (twanvl)",
|
||||||
|
"Sean Hunt (coppro)",
|
||||||
|
"Alissa Rao (Lymia)",
|
||||||
|
"Brendan Hagan (haganbmj)",
|
||||||
|
"CaiCai (247321453)",
|
||||||
|
"Olivier Bocksberger (G-e-n-e-v-e-n-s-i-S)",
|
||||||
|
"Thomas Tkacz (TomTkacz)"
|
||||||
|
};
|
||||||
|
|
||||||
void AboutWindow::draw(DC& dc) {
|
void AboutWindow::draw(DC& dc) {
|
||||||
wxSize ws = GetClientSize();
|
wxSize ws = GetClientSize();
|
||||||
|
|||||||
Reference in New Issue
Block a user