Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ZILtoid1991 committed Jul 24, 2023
2 parents 2381bda + a7e8baf commit d5008bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ public class ModuleConfig {
}
return null;
}
///Returns the number of the module, or -1 if the module name does not exist.
sizediff_t getModuleNum(string name) @safe const {
foreach (size_t i, string n; modNames) {
if (n == name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,13 +544,18 @@ public class ListView : WindowElement, ElementContainer, TextInputListener {
return null;
return item;
}
public void moveEntry(size_t index, size_t at) {
/**
* Moves the entry to the given position.
* Params:
* index: the entry to be moved.
* target: the position to be moved to.
*/
public void moveEntry(size_t index, size_t target) {
ListViewItem[] backup = entries[0..index - 1] ~ entries[index..$];
entries = backup[0..at] ~ entries[index] ~ backup[at..$];
entries = backup[0..target] ~ entries[index] ~ backup[target..$];
}
/**
*
* Returns:
* Returns the current x and y scroll positions.
*/
public int[2] scroll() {
int[2] result;
Expand All @@ -561,10 +566,7 @@ public class ListView : WindowElement, ElementContainer, TextInputListener {
return result;
}
/**
*
* Params:
* pos =
* Returns:
* Sets the scrolling to `pos`, then returns the new scrolling positions.
*/
public int[2] scroll(int[2] pos) {
if (horizSlider !is null)
Expand Down

0 comments on commit d5008bb

Please sign in to comment.